{#if isOpen}
{ if (e.key === 'Escape') onClose?.(); }} role="dialog" aria-modal="true" aria-labelledby="sleep-timer-title" tabindex="-1" >
e.stopPropagation()} role="none" >
Sleep Timer
{#if $sleepTimerActive}
{getActiveLabel()}
Cancel
{/if}
Stop after time
{ selectedMinutes = val as number; }} />
Set {selectedMinutes} min timer
Stop after current
{getEndOfTrackLabel()}
{#if isEpisode}
Stop after episodes
{#each episodePresets as count}
handleEpisodePreset(count)} class="w-full p-4 rounded-lg border border-gray-800 hover:border-[var(--color-jellyfin)]/50 hover:bg-[var(--color-jellyfin)]/5 transition-all text-left flex items-center gap-3" >
{count} more episode{count !== 1 ? "s" : ""}
{/each}
{/if}
{/if}