{#if toasts.length > 0}
{#each toasts as toast (toast.id)} {@const Icon = icons[toast.type]}
{toast.message}
{#if toast.action}
{ toast.action?.onClick(); handleDismiss(toast.id); }} class="toast-action" > {toast.action.label}
{/if}
handleDismiss(toast.id)} class="toast-dismiss" aria-label="Schließen" >
{/each}
{/if}