{"release_id":"01a247c3-a6b6-0000-74b2-4a83f2c91090","chunk_id":"01a247c3-a729-7752-9f68-081b5da40b5a","file":"Bvfh-z73.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}