import type { Notification, NotificationAction, NotificationSeverity } from 'stream-chat'; import type { AriaLivePriority } from '../../Accessibility'; import { type NotificationTargetPanel } from '../notificationTarget'; /** Tag of full-width system banners (e.g. connection status), which `NotificationList` excludes. */ export declare const SYSTEM_NOTIFICATION_TAG: "system"; export declare const hasSystemNotificationTag: (notification: Notification) => boolean; export type NotificationIncidentDescriptor = { /** Where the incident happened (e.g. api, browser, validation, permission). */ domain: string; /** Entity being operated on (e.g. message, poll, location, attachment). */ entity: string; /** Attempted operation (e.g. send, end, share, upload). */ operation: string; /** Status of the operation (e.g. failed, success, blocked). */ status?: string; }; export type AddNotificationParams = { /** Interactive actions rendered by the notification component. */ actions?: NotificationAction[]; /** * Overrides the aria-live priority the notification is announced with. Defaults to `assertive` * for `error` severity and `polite` otherwise. Use `assertive` for a confirmation that should be * heard promptly instead of queued behind a competing announcement (e.g. a focus change). */ ariaLive?: AriaLivePriority; /** Arbitrary context metadata stored in `origin.context`. */ context?: Record; /** Duration in milliseconds after which the notification auto-dismisses. */ duration?: number; /** Logical source emitting the notification (e.g. component or feature name). */ emitter: string; /** Underlying error object attached as `options.originalError`. */ error?: Error; /** Human-readable notification message. */ message: string; /** Notification severity visualized by the UI. */ severity?: NotificationSeverity; /** Additional tags appended to target panel tags. */ tags?: string[]; /** Explicit target panels; when provided, inferred panel is ignored. */ targetPanels?: NotificationTargetPanel[]; /** Structured descriptor of the incident this notification reports on. */ incident?: NotificationIncidentDescriptor; /** * Machine-readable type identifier (`domain:entity:operation:status`), used by consumers to route * behavior, including translation lookup. Generated from `incident` when omitted and `incident` * is provided. */ type?: string; }; /** * {@link AddNotificationParams} without `targetPanels`: system banners are global and get the * `system` tag instead of `target:*` panel tags. */ export type AddSystemNotificationParams = Omit; /** * Returns the notification ID, which `removeNotification`, `startNotificationTimeout` and * `ensureNotificationTimeout` take. */ export type AddNotification = (params: AddNotificationParams) => string; /** Returns the notification ID, for removal and timeouts. */ export type AddSystemNotification = (params: AddSystemNotificationParams) => string; export type RemoveNotification = (id: string) => void; export type StartNotificationTimeout = (id: string) => void; /** Starts a notification's countdown unless one is already running. */ export type EnsureNotificationTimeout = (id: string) => void; export type NotificationApi = { addNotification: AddNotification; addSystemNotification: AddSystemNotification; ensureNotificationTimeout: EnsureNotificationTimeout; removeNotification: RemoveNotification; startNotificationTimeout: StartNotificationTimeout; }; export declare const useNotificationApi: () => NotificationApi; //# sourceMappingURL=useNotificationApi.d.ts.map