/** * useNotifications Hook * * Manages toast notifications with auto-dismiss */ import type { NotificationType } from '../components/overlays/Notification.js'; export interface AppNotification { id: string; type: NotificationType; message: string; title?: string; duration?: number; createdAt: number; } export interface UseNotificationsOptions { defaultDuration?: number; maxNotifications?: number; } /** * Options for adding notifications */ export interface NotificationOptions { title?: string; duration?: number; /** Prevent duplicate messages of the same type (v1.50.4) */ dedupe?: boolean; /** Source identifier for notification history (e.g., 'sync', 'download') */ source?: string; } /** * Shorthand options for convenience methods */ export interface ShorthandNotificationOptions { title?: string; dedupe?: boolean; } export interface NotificationsState { notifications: AppNotification[]; addNotification: (type: NotificationType, message: string, options?: NotificationOptions) => string; removeNotification: (id: string) => void; clearNotifications: () => void; success: (message: string, options?: ShorthandNotificationOptions) => string; error: (message: string, options?: ShorthandNotificationOptions) => string; warning: (message: string, options?: ShorthandNotificationOptions) => string; info: (message: string, options?: ShorthandNotificationOptions) => string; } /** * Hook for managing notifications */ export declare function useNotifications({ defaultDuration, maxNotifications }?: UseNotificationsOptions): NotificationsState; //# sourceMappingURL=useNotifications.d.ts.map