{namespace vh=Newland\NeosViewHelpers\ViewHelpers}
{namespace poi=Newland\Toubiz\Poi\Neos\ViewHelpers}
<div
    id="target-enhancement-target-info"
    class="tb-tab-navigation__target is-target"
    data-target-enhancement-subject>

    <poi:collection.attributes.notAllEmpty
        integers="{
            0: article.flatAttributes.difficultyRating,
            1: article.flatAttributes.tourLength,
            2: article.flatAttributes.ascentElevation,
            3: article.flatAttributes.maximumAltitude,
            4: article.flatAttributes.tourDuration
        }">

        <div class="mb-4">
            <table class="tb-table tb-table--with-dividers tb-table--mobile-two-columns">
                <tbody>
                <f:if
                    condition="{article.flatAttributes.difficultyRating} && {article.flatAttributes.difficultyRating.intValue} > 0">
                    <tr>
                        <th>
                            <vh:translate
                                id="property.attribute.difficultyRating"
                                package="Newland.Toubiz.Poi.Neos"
                                source="Models/Article"/>

                        </th>
                        <td colspan="3">
                            <vh:render
                                partial="PointOfInterests/Attribute"
                                arguments="{
                                        type: 'difficulty',
                                        name: 'difficultyRating',
                                        attribute: article.flatAttributes.difficultyRating.intValue
                                    }"/>

                        </td>
                    </tr>
                </f:if>
                <f:if
                    condition="{article.flatAttributes.tourLength} && {article.flatAttributes.tourLength.intValue} > 0 ||
                    {article.flatAttributes.tourDuration} && {article.flatAttributes.tourDuration.intValue} > 0">
                    <tr>
                        <f:if condition="{article.flatAttributes.tourLength.intValue} > 0">
                            <th>
                                <vh:translate
                                    id="property.attribute.tourLength"
                                    package="Newland.Toubiz.Poi.Neos"
                                    source="Models/Article"/>

                            </th>

                            <td>
                                    <span itemprop="distance">
                                        <vh:render
                                            partial="PointOfInterests/Attribute"
                                            arguments="{
                                                type: 'distance',
                                                subType: 'kilometer',
                                                name: 'tourLength',
                                                attribute: article.flatAttributes.tourLength.intValue
                                            }"/>

                                    </span>
                            </td>
                        </f:if>
                        <f:if condition="{article.flatAttributes.tourDuration.intValue} > 0">
                            <th>
                                <vh:translate
                                    id="property.attribute.tourDuration"
                                    package="Newland.Toubiz.Poi.Neos"
                                    source="Models/Article"/>

                            </th>

                            <td>
                                <svg class="c-icon" aria-hidden="true">
                                    <use xlink:href="#icon-duration"></use>
                                </svg>
                                <vh:render
                                    partial="PointOfInterests/Attribute"
                                    arguments="{
                                            type: 'time',
                                            name: 'tourDuration',
                                            attribute: article.flatAttributes.tourDuration.intValue
                                        }"/>

                            </td>
                        </f:if>
                    </tr>
                </f:if>
                <f:if
                    condition="{article.flatAttributes.ascentElevation} && {article.flatAttributes.ascentElevation.intValue} >= 0">
                    <tr>
                        <th>
                            <vh:translate
                                id="property.attribute.ascentElevation"
                                package="Newland.Toubiz.Poi.Neos"
                                source="Models/Article"/>

                        </th>
                        <td>
                            <svg class="c-icon" aria-hidden="true">
                                <use xlink:href="#icon-ascend"></use>
                            </svg>

                            <vh:render
                                partial="PointOfInterests/Attribute"
                                arguments="{
                                        type: 'distance',
                                        subType: 'meter',
                                        name: 'ascentElevation',
                                        attribute: article.flatAttributes.ascentElevation
                                    }"/>

                        </td>
                        <f:if condition="{article.flatAttributes.descentElevation.intValue} >= 0">
                            <th>
                                <vh:translate
                                    id="property.attribute.descentElevation"
                                    package="Newland.Toubiz.Poi.Neos"
                                    source="Models/Article"/>

                            </th>
                            <td>
                                <svg class="c-icon" aria-hidden="true">
                                    <use xlink:href="#icon-descend"></use>
                                </svg>

                                <vh:render
                                    partial="PointOfInterests/Attribute"
                                    arguments="{
                                            type: 'distance',
                                            subType: 'meter',
                                            name: 'descentElevation',
                                            attribute: article.flatAttributes.descentElevation
                                        }"/>

                            </td>
                        </f:if>
                    </tr>
                </f:if>
                <f:if
                    condition="{article.flatAttributes.maximumAltitude} && {article.flatAttributes.maximumAltitude.intValue} > 0">
                    <tr>
                        <th>
                            <vh:translate
                                id="property.attribute.maximumAltitude"
                                package="Newland.Toubiz.Poi.Neos"
                                source="Models/Article"/>

                        </th>
                        <td>
                            <svg class="c-icon" aria-hidden="true">
                                <use xlink:href="#icon-toggle-up"></use>
                            </svg>

                            <vh:render
                                partial="PointOfInterests/Attribute"
                                arguments="{
                                        type: 'distance',
                                        subType: 'meter',
                                        name: 'maximumAltitude',
                                        attribute: article.flatAttributes.maximumAltitude
                                    }"/>

                        </td>
                        <f:if condition="{article.flatAttributes.minimumAltitude.intValue} > 0">
                            <th>
                                <vh:translate
                                    id="property.attribute.minimumAltitude"
                                    package="Newland.Toubiz.Poi.Neos"
                                    source="Models/Article"/>

                            </th>
                            <td>
                                <svg class="c-icon" aria-hidden="true">
                                    <use xlink:href="#icon-toggle-down"></use>
                                </svg>

                                <vh:render
                                    partial="PointOfInterests/Attribute"
                                    arguments="{
                                            type: 'distance',
                                            subType: 'meter',
                                            name: 'minimumAltitude',
                                            attribute: article.flatAttributes.minimumAltitude
                                        }"/>

                            </td>
                        </f:if>
                    </tr>
                </f:if>
                </tbody>
            </table>
        </div>
    </poi:collection.attributes.notAllEmpty>

    <f:if condition="{article.abstract}">
        <div class="text-grey-darkest leading-normal text-base" itemprop="description">
            {article.abstract -> f:format.raw()}
        </div>
    </f:if>
</div>
