{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}"
>
    <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 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>
                    <p class="tb-teaser__topline">{article.flatAttributes.cureLabel}</p>
                </span>
            </f:if>
            <span>
                <common:slot.render slot="aboveTitle" context="{ article: article }" />
                <common:slot.render slot="aboveTeaserTitle" context="{ article: article }" />
                <h3 class="tb-teaser__title">
                    {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>
