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

<poi:link.article
    article="{article}"
    class="tb-teaser tb-teaser--{teaserStyle}"
    additionalAttributes="{
        itemscope: 'itemscope',
        itemtype: 'http://schema.org/City',
        itemid: 'urn:uuid:{article.persistenceObjectIdentifier}'
    }">

    <common:slot.render slot="aboveTeaser" context="{ article: article }" />
    <vh:render section="content" arguments="{_all}" />
    <common:slot.render slot="belowTeaser" context="{ article: article }" />
</poi:link.article>

<f:section name="content">
    <span itemprop="image" itemscope itemtype="http://schema.org/ImageObject" class="{f:if(condition: '{teaserStyle} === "poster"', then: 'h-full')}">
        <vh:render partial="PointOfInterests/Teaser/Common/Image" arguments="{_all}" />
        <div class="tb-teaser__text">
            <f:if condition="{article.flatAttributes.cureLabel}">
                <span itemprop="additionalProperty" itemscope itemtype="http://schema.org/PropertyValue">
                    <meta itemprop="name" content="topline">
                    <p class="tb-teaser__topline" itemprop="value">{article.flatAttributes.cureLabel}</p>
                </span>
            </f:if>
            <span itemprop="additionalProperty" itemscope itemtype="http://schema.org/PropertyValue">
                <meta itemprop="name" content="headline">

                <common:slot.render slot="aboveTitle" context="{ article: article }" />
                <common:slot.render slot="aboveTeaserTitle" context="{ article: article }" />
                <h3 class="tb-teaser__title" itemprop="value">
                    {article.name}
                </h3>
                <common:slot.render slot="belowTeaserTitle" context="{ article: article }" />
                <common:slot.render slot="belowTitle" context="{ article: article }" />

                <f:format.raw>
                    <vh:format.crop maxCharacters="150" append=" …" input="{article.abstract}" />
                </f:format.raw>
            </span>
            <vh:render partial="PointOfInterests/Teaser/Common/Awards" arguments="{_all}" />
        </div>
    </span>
</f:section>
