import { ReactNode } from 'react'; import { MessageVariant, SnackbarPosition } from './Message.types'; /** * Options for showing a snackbar */ export interface ShowSnackbarOptions { /** * The message content to display */ message: ReactNode; /** * The variant/type of message to display * @default 'info' */ variant?: MessageVariant; /** * Optional action button configuration */ action?: { label: string; onClick: () => void; }; /** * Whether to show the close button * @default true */ showCloseButton?: boolean; /** * Auto-hide duration in milliseconds * Set to null or 0 to disable auto-hide * @default 5000 */ autoHideDuration?: number | null; /** * Custom ID for the snackbar (auto-generated if not provided) */ id?: string; } /** * Context value provided by SnackbarProvider */ export interface SnackbarContextValue { /** * Show a snackbar notification * Returns the ID of the created snackbar */ showSnackbar: (options: ShowSnackbarOptions) => string; /** * Hide a specific snackbar by ID */ hideSnackbar: (id: string) => void; /** * Clear all snackbars */ clearAll: () => void; /** * Convenience method to show a success snackbar */ success: (message: ReactNode, options?: Omit) => string; /** * Convenience method to show an error snackbar */ error: (message: ReactNode, options?: Omit) => string; /** * Convenience method to show a warning snackbar */ warning: (message: ReactNode, options?: Omit) => string; /** * Convenience method to show an info snackbar */ info: (message: ReactNode, options?: Omit) => string; } /** * Props for the SnackbarProvider component */ export interface SnackbarProviderProps { /** * Child components that will have access to the snackbar context */ children: ReactNode; /** * Position of the snackbar stack * @default 'bottom-center' */ position?: SnackbarPosition; /** * Maximum number of snackbars to show at once * Oldest will be removed when limit is exceeded * @default 5 */ maxSnackbars?: number; /** * Maximum width for snackbars */ maxWidth?: string | number; /** * Test ID for testing */ dataTestId?: string; } //# sourceMappingURL=SnackbarProvider.types.d.ts.map