{namespace vh=Newland\NeosViewHelpers\ViewHelpers}

<f:if condition="{article.media -> f:count()} < 3">
    <f:if condition="{article.media -> f:count()} > 0">
        <div class="mb-8">
            <figure
                role="group"
                class="tb-gallery-preview tb-gallery-preview--single-image"
                data-toubiz-gallery>

                <div class="tb-gallery-preview__main">
                    <f:render
                        partial="PointOfInterests/Show/GalleryItem"
                        arguments="{item: article.mediaSorted.0, caption: TRUE}" />

                </div>
                <div data-toubiz-gallery-item-container>
                    <f:for each="{vh:collection.slice(collection: article.media, offset: 1)}" as="item">
                        <a data-toubiz-gallery-item href="{item.sourceUri}"></a>
                    </f:for>
                </div>
                <button
                    data-toubiz-gallery-open
                    class="tb-gallery-preview__button">

                    <span class="tb-gallery-preview__flex-wrapper">
                        <svg class="c-icon" aria-hidden="true">
                            <use xlink:href="#tb-poi-icon-expand-gallery" />
                        </svg>

                        <span>
                            {article.media -> f:count()}
                            <f:if condition="{article.media -> f:count()} > 1">
                                <f:then>
                                    {f:translate(id: 'gallery.images', package: 'Newland.Toubiz.Poi.Neos', source: 'Views/Show')}
                                </f:then>
                                <f:else>
                                    {f:translate(id: 'gallery.image', package: 'Newland.Toubiz.Poi.Neos', source: 'Views/Show')}
                                </f:else>
                            </f:if>
                        </span>
                    </span>
                </button>
            </figure>
        </div>
    </f:if>
</f:if>

<f:if condition="{article.isAttraction}">
    <f:render partial="PointOfInterests/Show/Attributes/Thermal" arguments="{_all}" />

    <div class="mb-8">
        <f:render partial="PointOfInterests/Show/Content" arguments="{_all}" />
    </div>
    <div class="mb-8">
        <f:render partial="PointOfInterests/Show/Attributes/Attraction" arguments="{_all}" />
    </div>
    <div class="mb-8">
        <f:render partial="PointOfInterests/Show/Content/Map" arguments="{_all}" />
    </div>
</f:if>

<f:if condition="{article.isGastronomy}">
    <div class="mb-8">
        <f:render partial="PointOfInterests/Show/Attributes/Gastronomy" arguments="{_all}" />
    </div>
    <div class="mb-8">
        <f:render partial="PointOfInterests/Show/Content" arguments="{_all}" />
    </div>
    <div class="mb-8">
        <f:render partial="PointOfInterests/Show/Content/Map" arguments="{_all}" />
    </div>
</f:if>

<f:if condition="{article.isDirectMarketer}">

    <div class="mb-8">
        <f:render partial="PointOfInterests/Show/Content" arguments="{_all}" />
    </div>
    <div class="mb-8">
        <f:render partial="PointOfInterests/Show/Attributes/DirectMarketer" arguments="{_all}" />
    </div>
    <div class="mb-8">
        <f:render partial="PointOfInterests/Show/Content/Map" arguments="{_all}" />
    </div>
</f:if>

<f:if condition="{article.isTour}">
    <f:render partial="PointOfInterests/Show/Attributes/Tour" arguments="{_all}" />
</f:if>
