{#if scheduleType === 'daily'}
Daily
{:else if scheduleType === 'weekly'}
Weekly
{:else}
Custom
{/if}
Daily
Weekly
Custom
{#if scheduleType === 'daily' || scheduleType === 'weekly'}
at
{hours.find((h: { value: string; label: string }) => h.value === hour)?.label || hour}
{#each hours as h}
{/each}
{minutes.find(m => m.value === minute)?.label || `:${minute}`}
{#each minutes as m}
{/each}
{#if scheduleType === 'weekly'}
on
{daysOfWeek.find(d => d.value === dayOfWeek)?.label || dayOfWeek}
{#each daysOfWeek as d}
{/each}
{/if} {:else} {@const readable = humanReadable()} {@const isInvalid = readable === 'Invalid'}
{/if}
{#if value} {@const readable = humanReadable()} {@const isInvalid = readable === 'Invalid'}
{readable}
{/if}