{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 }" />
    <div class="tb-teaser__image-wrapper">
        <f:if condition="{article.mainMedium}">
            <f:then>
                <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}"')}
                />
            </f:then>
            <f:else>
                <img
                    data-src="https://mein.toubiz.de/api/v1/file/placeholder/preview?fm=image/jpeg&w=400"
                    alt=""
                    class="tb-teaser__image lazyload"
                />
            </f:else>
        </f:if>
    </div>

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