{#each $toasts as toast (toast.id)}
{#if toast.kind === "info"}
{toast.icon} {toast.message}
{:else if toast.kind === "achievement"} {@const rarity = getAchievementRarity(toast.achievement.id)} {@const colour = getRarityColour(rarity)}
{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!

Current version: {toast.currentVersion}

{/if}
{/each}