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

<common:slot.render slot="aboveListResults" context="{ eventDates: eventDates }" />

<vh:render partial="FilteredLists/ResultCount" arguments="{ pagination: pagination }"/>

<f:if condition="{eventDates -> f:count()} > 0">
    <f:then>
        <f:if condition="{displayAsTeaserList}">
            <f:then>
                <vh:render
                    partial="FilteredLists/FilteredTeaserList"
                    arguments="{
                        eventDates: eventDates,
                        pagination: pagination,
                        targetNode: documentNode,
                        node: node,
                        query: query,
                        disablePagination: disablePagination
                    }"/>
            </f:then>
            <f:else>
                <vh:render
                    partial="FilteredLists/FilteredList"
                    arguments="{
                        eventDates: eventDates,
                        pagination: pagination,
                        targetNode: documentNode,
                        node: node,
                        query: query,
                        disablePagination: disablePagination
                    }"/>
            </f:else>
        </f:if>
    </f:then>
    <f:else>
        <p>Für Ihre Suche konnten leider keine Ergebnisse gefunden werden</p>
    </f:else>
</f:if>

<common:slot.render slot="belowListResults" context="{ eventDates: eventDates }" />
