/** * NotificationQueue - Priority-based notification system with auto-dismiss and dedup. * * Renders up to 3 visible notifications at a time, newest first. * Each notification has a priority level that controls its auto-dismiss timeout. * Notifications with the same key replace each other (dedup). */ /** * [WHO]: NotificationQueue * [FROM]: Depends on @catui/tui * [TO]: Consumed by modes/interactive/interactive-mode.ts * [HERE]: modes/interactive/components/notification-queue.ts - */ import { Container, type TUI } from "@catui/tui"; import type { Theme } from "../theme/theme.js"; export type NotificationPriority = "immediate" | "high" | "medium" | "low"; export type NotificationType = "info" | "warning" | "error"; export interface NotificationOptions { /** Dedup key — replacing existing notification with the same key. */ key?: string; priority?: NotificationPriority; type?: NotificationType; /** Auto-dismiss timeout in ms. 0 = never auto-dismiss. Default based on priority. */ duration?: number; } export declare class NotificationQueue extends Container { private tui; private theme; private items; private textComponents; constructor(tui: TUI, theme: Theme); /** * Show a notification. */ notify(message: string, options?: NotificationOptions): void; private scheduleDismiss; private removeItem; private renderVisible; private getTypePrefix; private rebuildChildren; /** * Clear all notifications. */ clearAll(): void; /** * Get the number of active notifications. */ get count(): number; }