{m.events_title()}
{#if isEditor}
(showCreateModal = true)}> {m.events_new()}
{/if}
{#each statusTabs as tab}
switchStatus(tab.value)} > {tab.label}
{/each}
{#if data.events.length === 0}
celebration
{m.events_empty_title()}
{m.events_empty_desc()}
{#if isEditor}
(showCreateModal = true)} > {m.events_create()}
{/if}
{:else}
{#each data.events as event}
{/each}
{/if}
{#if showCreateModal}
e.key === "Escape" && (showCreateModal = false)} onclick={(e) => e.target === e.currentTarget && (showCreateModal = false)} role="dialog" aria-modal="true" aria-label={m.events_create()} >
{m.events_create()}
(showCreateModal = false)} aria-label={m.btn_close()} >
close
{ e.preventDefault(); handleCreate(); }} >
{m.events_form_color()}
{#each presetColors as color}
(newEventColor = color)} aria-label={m.events_form_select_color({ color, })} >
{/each}
{ showCreateModal = false; resetForm(); }} > {m.btn_cancel()}
{creating ? m.events_creating() : m.events_create()}
{/if}