{namespace poi=Newland\Toubiz\Poi\Neos\ViewHelpers}
{namespace vh=Newland\NeosViewHelpers\ViewHelpers}

<poi:collection.attributes.notAllEmpty
    strings="{
        0: article.flatAttributes.thermalClassification
    }"

    integers="{
        0: article.flatAttributes.thermalPoolQuantityInside,
        1: article.flatAttributes.thermalPoolTemperatureStartInside,
        2: article.flatAttributes.thermalPoolTemperatureEndInside,
        3: article.flatAttributes.thermalPoolQuantityOutside,
        4: article.flatAttributes.thermalPoolTemperatureStartOutside,
        5: article.flatAttributes.thermalPoolTemperatureEndOutside,
        6: article.flatAttributes.thermalSaunaQuantity,
        7: article.flatAttributes.thermalSaunaMinimumTemperature,
        8: article.flatAttributes.thermalSaunaMaximumTemperature
    }">

    <div class="mb-8">
        <f:if condition="{article.flatAttributes.thermalClassification.hasContents}">
            <h3 class="text-lg font-bold text-grey-darkest mb-2">
                <f:render
                    partial="PointOfInterests/Attribute"
                    arguments="{
                        type: 'text',
                        attribute: article.flatAttributes.thermalClassification
                    }"/>
            </h3>
        </f:if>

        <ul class="tb-key-value-tiles list-reset m-0 p-0 flex flex-wrap">
            <poi:collection.attributes.notAllEmpty
                integers="{
                    0: article.flatAttributes.thermalPoolQuantityInside,
                    1: article.flatAttributes.thermalPoolTemperatureStartInside,
                    2: article.flatAttributes.thermalPoolTemperatureEndInside
                }">

                <li class="tb-key-value-tiles__item flex">
                    <span class="tb-key-value-tiles__item-key">
                        <span class="font-bold text-5xl text-black leading-tight">
                            {article.flatAttributes.thermalPoolQuantityInside}
                        </span>
                    </span>

                    <span class="tb-key-value-tiles__item-value">
                        <span class="text-base text-grey-darkest">
                            <vh:translate
                                id="property.attribute.thermalPoolQuantityInside"
                                package="Newland.Toubiz.Poi.Neos"
                                source="Models/Article"/>
                        </span>
                        <span class="text-base text-grey-dark mt-2">
                            <f:if condition="{article.flatAttributes.thermalPoolTemperatureStartInside}">
                                {article.flatAttributes.thermalPoolTemperatureStartInside} °C
                            </f:if>

                            <f:if condition="{article.flatAttributes.thermalPoolTemperatureEndInside}">
                                -
                                {article.flatAttributes.thermalPoolTemperatureEndInside} °C
                            </f:if>
                        </span>
                    </span>
                </li>
            </poi:collection.attributes.notAllEmpty>

            <poi:collection.attributes.notAllEmpty
                integers="{
                    0: article.flatAttributes.thermalPoolQuantityOutside,
                    1: article.flatAttributes.thermalPoolTemperatureStartOutside,
                    2: article.flatAttributes.thermalPoolTemperatureEndOutside
                }">

                <li class="tb-key-value-tiles__item flex">
                    <span class="tb-key-value-tiles__item-key">
                        <span class="font-bold text-5xl text-black leading-tight">
                            {article.flatAttributes.thermalPoolQuantityOutside}
                        </span>
                    </span>

                    <span class="tb-key-value-tiles__item-value">
                        <span class="text-base text-grey-darkest">
                            <vh:translate
                                id="property.attribute.thermalPoolQuantityOutside"
                                package="Newland.Toubiz.Poi.Neos"
                                source="Models/Article"/>
                        </span>
                        <span class="text-base text-grey-dark mt-2">
                            <f:if condition="{article.flatAttributes.thermalPoolTemperatureStartOutside}">
                                {article.flatAttributes.thermalPoolTemperatureStartOutside} °C
                            </f:if>

                            <f:if condition="{article.flatAttributes.thermalPoolTemperatureEndOutside}">
                                -
                                {article.flatAttributes.thermalPoolTemperatureEndOutside} °C
                            </f:if>
                        </span>
                    </span>
                </li>
            </poi:collection.attributes.notAllEmpty>

            <poi:collection.attributes.notAllEmpty
                integers="{
                    0: article.flatAttributes.thermalSaunaQuantity,
                    1: article.flatAttributes.thermalSaunaMinimumTemperature,
                    2: article.flatAttributes.thermalSaunaMaximumTemperature
                }">

                <li class="tb-key-value-tiles__item flex">
                    <span class="tb-key-value-tiles__item-key">
                        <span class="font-bold text-5xl text-black leading-tight">
                            {article.flatAttributes.thermalSaunaQuantity}
                        </span>
                    </span>

                    <span class="tb-key-value-tiles__item-value">
                        <span class="text-base text-grey-darkest">
                            <vh:translate
                                id="property.attribute.thermalSaunaQuantity"
                                package="Newland.Toubiz.Poi.Neos"
                                source="Models/Article"/>
                        </span>
                        <span class="text-base text-grey-dark mt-2">
                            <f:if condition="{article.flatAttributes.thermalSaunaMinimumTemperature}">
                                {article.flatAttributes.thermalSaunaMinimumTemperature} °C
                            </f:if>

                            <f:if condition="{article.flatAttributes.thermalPoolTemperatureEndOutside}">
                                -
                                {article.flatAttributes.thermalSaunaMaximumTemperature} °C
                            </f:if>
                        </span>
                    </span>
                </li>
            </poi:collection.attributes.notAllEmpty>
        </ul>
    </div>
</poi:collection.attributes.notAllEmpty>
