/** * Notification Context * * React context for managing toast-style notifications. */ import React from 'react'; import type { NotificationContextValue, NotificationSeverity } from './types.js'; /** * Context for notification management. */ export declare const NotificationContext: React.Context; /** * Hook to access notification context. * * @throws Error if used outside of NotificationProvider * @returns Notification context value * * @example * ```tsx * function MyComponent() { * const { addError, addSuccess } = useNotifications(); * * const handleSave = async () => { * try { * await save(); * addSuccess('Changes saved successfully'); * } catch (error) { * addError('Failed to save changes', () => handleSave()); * } * }; * } * ``` */ export declare function useNotifications(): NotificationContextValue; /** * Default auto-dismiss times by severity. */ export declare const DEFAULT_AUTO_DISMISS_MS: Record; interface NotificationProviderProps { children: React.ReactNode; /** * Maximum number of notifications to show at once. * Oldest notifications are removed when limit is exceeded. * @default 5 */ maxNotifications?: number; } /** * Provider component for notification management. * * @example * ```tsx * import { NotificationProvider, NotificationContainer } from '@pantheon-systems/puck-css'; * * function App() { * return ( * * * * * ); * } * ``` */ export declare function NotificationProvider({ children, maxNotifications, }: NotificationProviderProps): React.ReactElement; export {};