import React, { type ReactNode } from 'react'; import { type AlertColor } from '@mui/material'; /** * Notification configuration options * * @example * { duration: 10000 } */ export interface NotificationOptions { /** * Duration in milliseconds before auto-dismiss * @default 6000 */ duration?: number; } /** * Notification context value * * @example * // See {@link useNotification} for usage */ export interface NotificationContextValue { /** * Display a notification message * @param message - The message to display * @param severity - The severity level (success, error, warning, info) * @param options - Optional configuration (duration, etc.) */ showNotification: (message: string, severity: AlertColor, options?: NotificationOptions) => void; } /** * NotificationProvider props */ interface NotificationProviderProps { children: ReactNode; } /** * NotificationProvider component * * Provides a global notification system using MUI Snackbar and Alert components. * Supports queuing, auto-dismiss, manual dismiss, and responsive positioning. * * Features: * - Queue management (max 3 visible at once) * - Auto-dismiss after configurable duration (default 6s) * - Manual dismiss via close button * - Severity variants: success, error, warning, info * - Responsive positioning: bottom-left (desktop), bottom-center (mobile) * * Usage: * ```tsx * * * * ``` * * @example * const { showNotification } = useNotification(); * showNotification('Login successful', 'success'); * showNotification('Failed to save', 'error'); * showNotification('Info message', 'info', { duration: 10000 }); */ declare const NotificationProvider: { ({ children }: NotificationProviderProps): React.ReactElement; displayName: string; }; /** * Hook to access notification context * * @throws {ReactSharedError} If used outside of NotificationProvider * @returns Notification context value with showNotification function * * @example * const { showNotification } = useNotification(); * showNotification('Operation completed', 'success'); */ declare const useNotification: () => NotificationContextValue; export { NotificationProvider, useNotification }; //# sourceMappingURL=NotificationContext.d.ts.map