{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
    }">

    <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">
                        <f: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">
                <tr>
                    <th>
                        <vh:translate
                            id="property.attribute.tourLength"
                            package="Newland.Toubiz.Poi.Neos"
                            source="Models/Article"/>

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

                        </span>
                    </td>
                    <th>
                        <vh:translate
                            id="property.attribute.tourDuration"
                            package="Newland.Toubiz.Poi.Neos"
                            source="Models/Article"/>

                    </th>
                    <f:if condition="{article.flatAttributes.tourDuration.intValue} > 0">
                        <td>
                            <svg class="c-icon" aria-hidden="true">
                                <use xlink:href="#icon-duration"></use>
                            </svg>
                            <f: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>

                        <f: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>

                            <f: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>

                        <f: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>

                            <f: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>
    <div>
        <f:render partial="PointOfInterests/Show/Content/Map" arguments="{_all}"/>
    </div>
</div>
