import type { NotificationCounts, NotificationLabels, NotificationSourceBinding } from "../core/NotificationSourceProps"; /** Strings the bell and the panel add to the shared ones; anything left out stays English. */ export interface NotificationCenterLabels extends NotificationLabels { /** The bell's accessible name, built from the server counts. */ bell: (counts: NotificationCounts) => string; /** Panel heading. */ title: string; /** First tab: decisions and unread mentions. */ needsYouTab: string; /** Second tab: everything else. */ activityTab: string; /** Accessible name of the tab list. */ tabsLabel: string; /** Header action for the open tab. */ markAllRead: string; /** Footer link to the full inbox. */ openInbox: string; /** Header gear. */ settings: string; /** Close button of the phone sheet. */ close: string; /** Spoken while the first fetch is running. */ loading: string; /** Heading of the failed-load panel. */ loadErrorTitle: string; /** Body of the failed-load panel. */ loadErrorDescription: string; /** Heading shown when the person's role can't see notifications. */ noAccessTitle: string; /** Body of the no-access panel; `appName` comes from the source. */ noAccessDescription: (appName?: string) => string; /** Heading of an empty Needs you tab. */ emptyNeedsYouTitle: string; /** Body of an empty Needs you tab. */ emptyNeedsYouDescription: string; /** Heading of an empty Activity tab. */ emptyActivityTitle: string; /** Body of an empty Activity tab. */ emptyActivityDescription: string; /** Offline banner; `loadedAt` is the already formatted time of the last fetch, if known. */ offlineBanner: (loadedAt: string | undefined) => string; /** Visible text of the "N new" pill. */ newCount: (count: number) => string; /** Accessible name of the "N new" pill; must start with the visible text. */ newCountName: (count: number) => string; /** A tab count above the cap, e.g. "99+". */ overflowCount: (cap: number) => string; } /** Forces one presentation; leave it out and the panel follows the viewport. */ export type NotificationCenterVariant = "popover" | "sheet"; /** The panel's two tabs; type filters live only in the inbox. */ export type NotificationCenterTab = "needsYou" | "activity"; /** Bell plus panel with exactly two tabs; pass the source props, or render it inside a `NotificationCenterProvider`. Needs a `ToasterProvider` above. */ export type NotificationCenterProps = NotificationSourceBinding & { /** "popover" anchors the panel to the bell, "sheet" opens it full screen; defaults to a popover from 48em up and a sheet below. */ variant?: NotificationCenterVariant; /** Shows "Open inbox" in the panel footer; the library never routes. */ onOpenInbox?: () => void; /** Shows the settings gear in the panel header. */ onOpenSettings?: () => void; /** Controlled open state; leave it out and the bell toggles the panel itself. */ isOpen?: boolean; /** Called when the bell, Esc, an outside click or opening a row asks to open or close. */ onOpenChange?: (isOpen: boolean) => void; /** Tab on open; defaults to Needs you while it holds anything, else Activity. */ defaultTab?: NotificationCenterTab; /** Bell and panel strings; shared keys override the provider's for this component only. */ labels?: Partial; /** Test id root: the bell gets `-bell`, the panel `-panel`. */ "data-testid"?: string; };