/** * Announcement dismissal store. * * The dismissal COOKIE is the single source of truth: the hub's root layout * reads it server-side to decide whether to SSR-seed the bar (no flash for * dismissed users), and the client reads it via `isAnnouncementDismissed`. * One cookie per platform holding the LAST dismissed announcement id — * dismissal is an id-match, never mere cookie presence, so a new announcement * always shows after an old one was dismissed, and re-activating an old * announcement intentionally re-shows it. * * The legacy per-id localStorage key (`-announcement--dismissed`) * is READ-ONLY legacy: consulted only when no cookie exists for the platform, * purely as the migration trigger (the bar's mount effect backfills the * cookie). New dismissals write the cookie only, so the second store dies out. * * No `"use client"` directive on purpose — `announcementDismissCookieName` and * `isDismissedCookieValue` are pure/isomorphic and imported by the hub's * server layout; the DOM-touching helpers guard on `typeof document`. */ /** Cookie name for a platform's dismissed-announcement id — the ONE home for * the encoding, shared by the client writer and the hub's SSR reader. */ export declare function announcementDismissCookieName(platform: string): string; /** THE dismissal match rule (id-match, not presence), shared across the * server/client boundary. `undefined` id (no active announcement) → false. */ export { isDismissedCookieValue } from './dismiss-cookie'; /** Persist a dismissal: cookie only (1 year). The SSR layout sees it on the * next request; localStorage is intentionally NOT written (read-only legacy). */ export declare function dismissAnnouncement(platform: string, id: string): void; /** * Client-side dismissal check — cookie-first: the legacy localStorage key is * consulted ONLY when no cookie exists for the platform. Reads browser * storage, so callers must invoke it from effects, never during render * (a render-time read would desync hydration from the SSR HTML). */ export declare function isAnnouncementDismissed(platform: string, id: string): boolean; /** Remove ALL dismissal state for a platform (cookie + legacy localStorage * keys) — test/story helper so callers never restate the key encoding. */ export declare function clearAnnouncementDismissals(platform: string): void; /** One-time cleanup of pre-refactor storage: the orphaned announcement cache * (the old "instant paint" blob) — called from the bar's mount effect. */ export declare function clearLegacyAnnouncementCache(platform: string): void; //# sourceMappingURL=announcement-storage.d.ts.map