{namespace neos=Neos\Neos\ViewHelpers}
{namespace events=Newland\Toubiz\Events\Neos\ViewHelpers}
{namespace vh=Newland\NeosViewHelpers\ViewHelpers}
{namespace common=Newland\Toubiz\Common\Neos\ViewHelpers}

<f:layout name="Default"/>

<f:section name="Content">
    <common:slot.render slot="aboveStandaloneTeaser" context="{ event: event }" />
    <f:if condition="{neos:rendering.inBackend(node: node)}">
        <f:then>
            {wrapStart -> f:format.raw()}
            <vh:render partial="Events/Teaser" arguments="{event: event, targetNode: documentNode, slots: slots}" />
            {wrapEnd -> f:format.raw()}
        </f:then>
        <f:else if="{event} && {events:teaser.isExpired(event: event)} == false">
            {wrapStart -> f:format.raw()}
            <vh:render partial="Events/Teaser" arguments="{event: event, targetNode: documentNode, slots: slots}" />
            {wrapEnd -> f:format.raw()}
        </f:else>
    </f:if>
    <common:slot.render slot="belowStandaloneTeaser" context="{ event: event }" />
</f:section>
