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

<div class="mb-10">
    <f:if condition="{article.relatedLists.poiHighlights.articleIdentifiers}">
        <poi:entityList.articles articleList="{article.relatedLists.poiHighlights}" article="{article}" node="{node}">
            <f:if condition="{articles}">
                <h2 class="mt-0 mb-6">
                    <f:if condition="{article.toubizLegacyTour}">
                        <f:then>
                            <f:translate
                                id="relatedPoi.header"
                                package="Newland.Toubiz.Poi.Neos"
                                source="Views/Show" />
                        </f:then>
                        <f:else>
                            <f:translate
                                id="cityDetails.poiHighlights.headline"
                                arguments="{0: article.name}"
                                package="Newland.Toubiz.Poi.Neos"
                                source="Views/Cities" />
                        </f:else>
                    </f:if>

                </h2>
                <vh:render
                    partial="PointOfInterests/ItemList"
                    arguments="{vh:collection.merge(base: _all, extension: {  enableSwiper: 1 , id: 'poi_highlights' })}" />

            </f:if>
        </poi:entityList.articles>
    </f:if>

    <f:for each="{article.relatedLists.articleLists}" as="list" key="id">
        <div class="mt-10">
            <poi:entityList.articles articleList="{list}" limit="{listLimit}" article="{article}" node="{node}">
                <f:if condition="{totalCount}">
                    <h2 class="mt-0 pb-6">{list.title}</h2>

                    <vh:render
                        partial="PointOfInterests/ItemList"
                        contentAs="additionalSlides"
                        arguments="{vh:collection.merge(base: _all, extension: { enableSwiper: 1 })}">

                        <a
                            href="{listLink}"
                            class="c-show-all-card rounded-md group bg-gray-200 h-full flex justify-center items-center flex-col py-4 no-underline text-copy border-box">

                            <svg class="c-icon text-secondary bg-white rounded-full w-16 h-16 p-3 group-hover:text-white group-hover:bg-secondary transition-all transition-timing-ease-in transition-timing-short">
                                <use xlink:href="#icon-plus"></use>
                            </svg>

                            <h3 class="font-bold mt-6 flex items-center">
                                <span>
                                    <vh:translate
                                        id="swiper.showAll"
                                        package="Newland.Toubiz.Poi.Neos"
                                        source="Views/FilteredLists"/>

                                </span>
                                <svg class="c-icon top-0 ml-1">
                                    <use xlink:href="#icon-arrow-right"></use>
                                </svg>
                            </h3>
                            <p class="text-sm">({totalCount})</p>
                        </a>
                    </vh:render>

                    <a href="{listLink}" class="block w-full text-right text-secondary no-underline hover:no-underline focus:no-underline">
                        <vh:translate
                            id="swiper.showAll"
                            package="Newland.Toubiz.Poi.Neos"
                            source="Views/FilteredLists"/>

                        <svg class="c-icon" aria-hidden="true">
                            <use xlink:href="#icon-arrow-right"/>
                        </svg>
                    </a>
                </f:if>
            </poi:entityList.articles>
        </div>
    </f:for>
</div>
