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

<f:if condition="{article.isAttraction}">
    <li class="tb-results-list__item" itemscope itemtype="http://schema.org/TouristAttraction">
        <vh:render section="ListItem" arguments="{_all}" />
    </li>
</f:if>

<f:if condition="{article.isGastronomy}">
    <li class="tb-results-list__item" itemscope itemtype="http://schema.org/FoodEstablishment">
        <vh:render section="ListItem" arguments="{_all}" />
    </li>
</f:if>

<f:if condition="{article.isTour}">
    <li class="tb-results-list__item" itemscope itemtype="http://schema.org/TravelAction">
        <vh:render section="ListItem" arguments="{_all}" />
    </li>
</f:if>

<f:if condition="{article.isLodging}">
    <li class="tb-results-list__item" itemscope itemtype="http://schema.org/LodgingBusiness">
        <vh:render section="ListItem" arguments="{_all}" />
    </li>
</f:if>

<f:if condition="{article.isDirectMarketer}">
    <li class="tb-results-list__item" itemscope itemtype="http://schema.org/Store">
        <vh:render section="ListItem" arguments="{_all}" />
    </li>
</f:if>

<f:if condition="{article.isCongressLocation}">
    <li class="tb-results-list__item" itemscope itemtype="http://schema.org/EventVenue">
        <vh:render section="ListItem" arguments="{_all}" />
    </li>
</f:if>

<f:if condition="{article.isCity}">
    <li class="tb-results-list__item" itemscope itemtype="http://schema.org/City">
        <vh:render section="ListItem" arguments="{_all}" />
    </li>
</f:if>

<f:section name="ListItem">
    <poi:link.article article="{article}" class="tb-teaser tb-teaser--layout-horizontal">
        <vh:render section="ListItemContent" arguments="{_all}" />
    </poi:link.article>
    <vh:render section="SplitscreenInformation" arguments="{_all}" />
</f:section>

<f:section name="ListItemContent">
    <common:slot.render slot="aboveSplitScreenItem" context="{ article: article }" />
    <f:if condition="{article.mainMedium}">
        <f:then>
            <div class="tb-teaser__image-wrapper">
                <img
                    data-src="{article.mainMedium.previewUri}"
                    alt="{article.mainMedium.title}"
                    class="tb-teaser__image lazyload"
                    itemprop="image"
                    {f:if(condition: article.mainMedium.focusPoint, then: 'style="object-position: {article.mainMedium.focusPoint}"')}
                />

            </div>
        </f:then>
        <f:else>
            <div class="tb-teaser__image-wrapper">
                <div class="tb-teaser__image-fallback">
                    <svg class="c-icon">
                        <use xlink:href="#icon-image"></use>
                    </svg>
                </div>
            </div>
        </f:else>
    </f:if>

    <f:if condition="{article.isAttraction}">
        <vh:render partial="PointOfInterests/List/Article/Attraction" arguments="{article: article}" />
    </f:if>

    <f:if condition="{article.isGastronomy}">
        <vh:render partial="PointOfInterests/List/Article/Gastronomy" arguments="{article: article}" />
    </f:if>

    <f:if condition="{article.isTour}">
        <vh:render partial="PointOfInterests/List/Article/Tour" arguments="{article: article}" />
    </f:if>

    <f:if condition="{article.isLodging}">
        <vh:render partial="PointOfInterests/List/Article/Lodging" arguments="{article: article}" />
    </f:if>

    <f:if condition="{article.isDirectMarketer}">
        <vh:render partial="PointOfInterests/List/Article/DirectMarketer" arguments="{article: article}" />
    </f:if>

    <f:if condition="{article.isCongressLocation}">
        <vh:render partial="PointOfInterests/List/Article/CongressLocation" arguments="{article: article}" />
    </f:if>

    <f:if condition="{article.isCity}">
        <vh:render partial="PointOfInterests/List/Article/City" arguments="{article: article}" />
    </f:if>

    <common:slot.render slot="belowSplitScreenItem" context="{ article: article }" />

</f:section>
