{#each $toasts as toast (toast.id)}
{#if toast.kind === "info"}
{toast.icon}
{toast.message}
toastStore.remove(toast.id)} class="text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 transition-colors shrink-0" aria-label="Dismiss" >
{:else if toast.kind === "achievement"} {@const rarity = getAchievementRarity(toast.achievement.id)} {@const colour = getRarityColour(rarity)}
toastStore.remove(toast.id)} class="absolute top-2 right-2 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 transition-colors" aria-label="Dismiss notification" >
{toast.achievement.icon}
✨
✨
✨
Achievement Unlocked!
{toast.achievement.name}
{toast.achievement.description}
{rarity}
{#each Array.from({ length: 10 }, (_, i) => i) as confettiIndex (confettiIndex)}
{/each}
{:else if toast.kind === "update"}
🎉
Update Available!
openUrl(toast.releaseUrl)} class="text-[var(--accent-primary)] font-mono hover:underline text-sm" > {toast.latestVersion}
Current version: {toast.currentVersion}
toastStore.remove(toast.id)} class="text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors shrink-0" aria-label="Dismiss" >
{/if}
{/each}