/** * @fileoverview Saasflare NotificationCenter — bell-icon trigger + dropdown * with a list of notifications and per-item read/dismiss controls. * @author Saasflare™ * * Composes the existing Button + Popover + Badge primitives. Designed for * the "in-app inbox" pattern (unread badge on a header bell). Controlled * via the `items` array — saasflare-ui does NOT own the data store; the * consumer is expected to wire reads/dismisses through whichever state * layer they use (React state, react-query, RTK, etc.). * * @module packages/ui/components/ui/notification-center * @package ui * @layer core * * @example * api.read(id)} * onMarkAllRead={() => api.readAll()} * /> */ import { type ReactNode } from "react"; import { type SaasflareComponentProps } from "../../providers"; /** A single notification item. */ export interface NotificationItem { /** Stable unique id. */ id: string; /** Bold title line. */ title: ReactNode; /** Secondary body line. */ description?: ReactNode; /** Display timestamp (already formatted — e.g. "5m ago"). */ timestamp?: string; /** Whether the notification has been read. */ read?: boolean; /** Optional leading icon. */ icon?: ReactNode; /** Optional href — wraps the row in ``. */ href?: string; } /** Props for the NotificationCenter component. */ export interface NotificationCenterProps extends SaasflareComponentProps { /** Notifications to display. */ items: NotificationItem[]; /** Header title in the popover. Default: `"Notifications"`. */ title?: string; /** Called when the user clicks a row (also passes the item). */ onItemClick?: (item: NotificationItem) => void; /** Called when "Mark as read" is tapped on a row. */ onMarkRead?: (id: string) => void; /** Called when "Mark all as read" is tapped. Hide the action by omitting this. */ onMarkAllRead?: () => void; /** Custom empty-state content. */ emptyState?: ReactNode; /** Maximum items rendered (older ones truncated). */ limit?: number; /** Additional class names on the trigger button. */ triggerClassName?: string; /** Additional class names on the popover content. */ contentClassName?: string; } /** * Bell trigger + dropdown inbox of notifications. * * @component * @layer core */ export declare function NotificationCenter({ items, title, onItemClick, onMarkRead, onMarkAllRead, emptyState, limit, triggerClassName, contentClassName, surface, radius, animated, iconWeight, }: NotificationCenterProps): import("react/jsx-runtime").JSX.Element;