// #region Imports
import { html } from '../../../../../Dom/Html';
import { repeat, when } from '../../../../Directives/Directives';
import { partMap } from '../../../../Directives/part-map/PartMapDirective';
// #endregion
/**
 * The template function for the `SchedulerAgendaViewElement`.
 *
 * @internal
 */
export function schedulerAgendaViewElementTemplate(e) {
    return html `
        <div part="container">
            ${when(e.hasEvents, () => html `
                <div part="body">
                    <mosaik-scheduler-datescale part="datescale"
                                                .lang="${e.lang}"
                                                .dir="${e.dir}"
                                                .items="${e.datescaleItems}"></mosaik-scheduler-datescale>
                    <div part="events-wrapper">
                        ${repeat(e.agendaItems.filter((item) => item.events[0]), (item) => `${item.date.toISOString()}-${item.events[0]?.eventKey}`, (item) => html `
                            <div part=${partMap({ 'event-row': true, 'is-today': item.isToday, 'is-weekend': item.isWeekend, 'is-blackout': item.isBlackout })}
                                 @click="${() => e.activateEvent(item.events[0].eventKey, 'click')}">
                                <div part="event-indicator"></div>
                                <div part="event-content">
                                    <slot name="event-${item.events[0].eventKey}"></slot>
                                </div>
                            </div>
                        `)}
                    </div>
                </div>
            `, () => html `
                <div part="empty-state">
                    <slot name="empty-state">
                        <mosaik-empty-state .lang="${e.lang}"
                                            .dir="${e.dir}"
                                            .content="${e.intl?.noUpcomingEventsLabel ?? ''}"></mosaik-empty-state>
                    </slot>
                </div>
            `)}
        </div>
    `;
}
//# sourceMappingURL=SchedulerAgendaViewElementTemplate.js.map