{"release_id":"01a2309f-d47d-0000-29bc-a17a97e31fa5","chunk_id":"01a2309f-d5db-7f90-a98c-5a28ae930e71","file":"Dr6QtRJy.mjs","mappings":"wVAoBO,MAAMA,EAAsBC,EAAiB,CAAC,EACxCC,EAAaD,EAAiB,CAAC","names":["unreadNotifications","writable","unreadChat"],"sources":["../../../../../../src/lib/stores/unreadNotifications.ts"],"sourcesContent":["import { writable } from 'svelte/store';\n\n/**\n * RAT-272: shared unread-notifications counter.\n *\n * `NotificationBell.svelte` polls `/api/notifications/unread-count` every 5s\n * for its own badge — `BottomNav.svelte` needs the same number to drive the\n * Profile-slot coral dot. Rather than have both components fetch in parallel\n * (doubling the request rate), the bell owns the fetch and writes here; the\n * bottom nav just subscribes.\n *\n * Initial value 0 means a brief \"no badge\" flash on first paint, same as the\n * bell's local state — RAT-247 explicitly accepted that to keep the SSR\n * layout from depending on a transient lookup.\n *\n * RAT-300: chat unread piggy-backs on the same poll endpoint (which now\n * returns `{ count, notifications, chat }`) so the BottomNav messages-slot\n * dot stays consistent with the bell — same single fetch fans out to two\n * stores via the bell's $effect.\n */\nexport const unreadNotifications = writable<number>(0);\nexport const unreadChat = writable<number>(0);\n"],"version":3}