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

<svg style="display: none;">
    <symbol id="tb-poi-opening-times-toggle-open" viewBox="0 0 320 512"><path d="M151.5 347.8L3.5 201c-4.7-4.7-4.7-12.3 0-17l19.8-19.8c4.7-4.7 12.3-4.7 17 0L160 282.7l119.7-118.5c4.7-4.7 12.3-4.7 17 0l19.8 19.8c4.7 4.7 4.7 12.3 0 17l-148 146.8c-4.7 4.7-12.3 4.7-17 0z"/></symbol>
    <symbol id="tb-poi-opening-times-toggle-close" viewBox="0 0 320 512"><path d="M168.5 164.2l148 146.8c4.7 4.7 4.7 12.3 0 17l-19.8 19.8c-4.7 4.7-12.3 4.7-17 0L160 229.3 40.3 347.8c-4.7 4.7-12.3 4.7-17 0L3.5 328c-4.7-4.7-4.7-12.3 0-17l148-146.8c4.7-4.7 12.3-4.7 17 0z"/></symbol>
</svg>

<span data-vue="poi" style="display: none;">
    <tb-opening-times-line-preview
        :opening-times-definition="{article.openingTimes}"
        :language-labels="{common:allTranslations(source: 'Views/OpeningTimes', package: 'Newland.Toubiz.Poi.Neos') -> f:format.json()}"
        opening-times-format="{article.openingTimesFormat}"
        date-format="{vh:translate(id: 'dateFormat', package: 'Newland.Toubiz.Poi.Neos', source: 'Views/OpeningTimes')}">


        <f:if condition="{displayTable}">
            <template #additional_label="{ additionalActive }">
                <svg class="tb-hours-now__toggle-icon c-icon" aria-hidden="true">
                    <use :xlink:href="additionalActive ? '#tb-poi-opening-times-toggle-close' : '#tb-poi-opening-times-toggle-open'"></use>
                </svg>
            </template>

            <template #additional_information="{ upcomingOpeningTimes, additionalActive }">
                <tb-opening-times-table
                    v-if="additionalActive"
                    :language-labels="{common:allTranslations(source: 'Views/OpeningTimes', package: 'Newland.Toubiz.Poi.Neos') -> f:format.json()}"
                    :upcoming-opening-times="upcomingOpeningTimes"
                />
            </template>
        </f:if>
    </tb-opening-times-line-preview>
</span>
