/** * Notification Center Composable * * Provides a centralized notification system similar to Visual Studio Code. * * @example * ```typescript * import { useNotificationCenter } from '@mlightcad/cad-viewer' * * const { info, warning, error, success, notifications, unreadCount } = useNotificationCenter() * * // Add different types of notifications * info('Information', 'This is an info message') * warning('Warning', 'This is a warning message') * error('Error', 'This is an error message') * success('Success', 'This is a success message') * * // Add notification with actions * error('File Error', 'Failed to load file', { * actions: [ * { label: 'Retry', action: () => retryLoad(), primary: true }, * { label: 'Cancel', action: () => cancel() } * ], * persistent: true * }) * * // Check notification count * console.log(`You have ${unreadCount.value} notifications`) * ``` */ export interface Notification { id: string; type: 'info' | 'warning' | 'error' | 'success'; title: string; message?: string; timestamp: Date; actions?: NotificationAction[]; persistent?: boolean; timeout?: number; } export interface NotificationAction { label: string; action: () => void; primary?: boolean; } /** * Hook to access the notification center functionality * * @returns Object containing notification management functions and reactive state */ export declare function useNotificationCenter(): { /** Reactive list of all notifications */ notifications: import('vue').ComputedRef<{ id: string; type: "info" | "warning" | "error" | "success"; title: string; message?: string | undefined; timestamp: Date; actions?: { label: string; action: () => void; primary?: boolean | undefined; }[] | undefined; persistent?: boolean | undefined; timeout?: number | undefined; }[]>; /** Reactive count of unread notifications */ unreadCount: import('vue').ComputedRef; /** Reactive boolean indicating if there are any notifications */ hasNotifications: import('vue').ComputedRef; /** Add a custom notification */ add: (notification: Omit) => string; /** Remove a notification by ID */ remove: (id: string) => void; /** Clear all notifications */ clear: () => void; /** Clear all notifications (alias for clear) */ clearAll: () => void; /** Add an info notification */ info: (title: string, message?: string, options?: Partial) => string; /** Add a warning notification */ warning: (title: string, message?: string, options?: Partial) => string; /** Add an error notification */ error: (title: string, message?: string, options?: Partial) => string; /** Add a success notification */ success: (title: string, message?: string, options?: Partial) => string; }; //# sourceMappingURL=useNotificationCenter.d.ts.map