import type { AnyFunction, MakeRequired } from "@alanscodelog/utils"; export declare class NotificationHandler = RawNotificationEntry, TEntry extends NotificationEntry = NotificationEntry> { timeout: number; debug: boolean; private id; readonly queue: TEntry[]; readonly history: TEntry[]; maxHistory: number; listeners: NotificationListener[]; stringifier?: NotificationStringifier; constructor({ timeout, stringifier, maxHistory, }?: { timeout?: NotificationHandler["timeout"]; stringifier?: NotificationHandler["stringifier"]; maxHistory?: NotificationHandler["maxHistory"]; }); private _checkEntry; protected _createEntry>(rawEntry: TNotifyEntry): TEntry; notify>(rawEntry: TNotifyEntry): NotificationPromise; static resolveToDefault(notification: NotificationEntry): void; static dismiss(notification: NotificationEntry): void; stringify(notification: NotificationEntry): string; clear(): void; addNotificationListener(cb: NotificationListener): void; removeNotificationListener(cb: NotificationListener): void; } export type NotificationPromise = Promise; export type RawNotificationEntry = { message: string; title?: string; code?: string; options?: TOptions; requiresAction?: boolean; cancellable?: TCancellable; default?: TOptions[number]; dangerous?: TOptions[number][]; timeout?: number | boolean; icon?: string; }; export type NotificationEntry = RawNotificationEntry> = Omit, "cancellable"> & { promise: NotificationPromise; resolve: AnyFunction; cancellable?: string; timeout?: number; resolution?: string; id: number; }; export type NotificationListener> = (notification: TEntry, type: "added" | "resolved" | "deleted") => void; export type NotificationStringifier> = (notification: T) => string; //# sourceMappingURL=NotificationHandler.d.ts.map