import { LitElement } from "lit"; type NotificationType = `info` | `warning` | `error`; type NotificationContent = { readonly type: NotificationType; readonly message: string; readonly icon?: string; readonly onTap?: (id: string) => void; }; type Notification = NotificationContent & { readonly id: string; readonly createdAt: number; readonly updatedAt: number; }; interface NotificationRendererHooks { onTap: (id: string) => void; } interface NotificationRenderer { /** Called once when this renderer becomes active. */ attach: (hooks: NotificationRendererHooks) => void; /** Called once if this renderer is swapped out for another at runtime. */ detach?: () => void; /** * The manager's full, ranked view of currently-visible notifications * (index 0 = oldest/first, the one closest to eviction/dismissal). * Never longer than `queueSize`, since the manager evicts overflow itself. */ setNotifications: (notifications: Notification[], queueSize: number) => void; } type NotifierOptions = { renderer?: NotificationRenderer; timeout?: number; timeoutError?: number; queue?: boolean; queueSize?: number; tapBehaviour?: `none` | `dismiss`; tapHandlerDefault?: (notification: Notification) => void; }; /** A notification as remembered by a manager's history. */ type NotificationHistoryEntry = Notification & { /** `true` once read: via `markRead`/`markAllRead`, or when the user taps the toast. */ readonly read: boolean; /** Set once the toast is no longer visible (timed out, evicted, tapped away or dismissed). */ readonly dismissedAt?: number; }; type NotificationHistoryListener = (history: readonly NotificationHistoryEntry[]) => void; /** Options for `createNotificationManager` / `NotificationManager.scope`. */ type NotificationManagerOptions = NotifierOptions & { /** Max history entries kept per manager (oldest dropped first). Default 100. */ historyLimit?: number; }; type PillTapDetail = { readonly id: string; }; type PillTapEvent = CustomEvent; interface NotificationPillElementEventMap { 'pill-tap': PillTapEvent; } declare class NotificationPillElement extends LitElement { #private; notificationType: NotificationType; message: string; icon?: string; dismissing: boolean; notificationId: string; protected render(): import("lit").TemplateResult<1>; static styles: import("lit").CSSResult[]; } declare global { interface HTMLElementTagNameMap { 'ixfx-notification-pill': NotificationPillElement; } } interface NotificationPillElement { addEventListener: ((type: K, listener: (this: NotificationPillElement, event: NotificationPillElementEventMap[K]) => void, options?: boolean | AddEventListenerOptions) => void) & ((type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions) => void); } export { Notification as a, NotificationHistoryListener as c, NotificationRendererHooks as d, NotificationType as f, PillTapEvent as i, NotificationManagerOptions as l, NotificationPillElementEventMap as n, NotificationContent as o, NotifierOptions as p, PillTapDetail as r, NotificationHistoryEntry as s, NotificationPillElement as t, NotificationRenderer as u };