import { DefaultToastOptions } from '../components/toaster/gator/toaster.gator.js'; export type ToastCreateOptions = Partial & { title?: string; subtitle?: string; }; declare class ToasterService { /** * Find the toaster component in the DOM * @private * @returns The first visible toaster component or null if none found */ private findToaster; /** * Create a toast using the toaster found in the DOM * @param options - Configuration options for the toast * @param options.title - The main title text for the toast * @param options.subtitle - Optional subtitle text for the toast * @param options.variant - The visual variant of the toast ('info' | 'success' | 'warning' | 'error' | 'inverse') * @param options.duration - Duration in milliseconds before auto-dismiss (0 = sticky, >0 = auto-dismiss) * @param options.dismissible - Whether the toast can be manually dismissed by the user * @param options.exitIconLabel - Aria label for the dismiss button, default is 'Close Notification' * @param options.statusIconLabel - Aria label for the status icon, default is the variant name (info, success, warning, error) * @returns The unique ID of the created toast, or null if no toaster is found * @example * ```typescript * // Simple usage * const toastId = toasterService.createToast({ * title: 'Hello World', * subtitle: 'This is a toast message' * }); * * // Advanced usage * const toastId = toasterService.createToast({ * title: 'Custom Toast', * variant: 'warning', * duration: 10000, * dismissible: false * }); * ``` */ createToast(options: ToastCreateOptions): string | null; /** * Create a success toast with green styling * @param title - The main title text for the toast * @param subtitle - Optional subtitle text for the toast * @param options - Additional configuration options (variant will be overridden to 'success') * @returns The unique ID of the created toast, or null if no toaster is found * @example * ```typescript * toasterService.success('Operation Complete', 'The file was saved successfully'); * * // With custom options * toasterService.success('Saved!', 'File saved', { duration: 2000 }); * ``` */ success(title: string, subtitle?: string, options?: Omit): string | null; /** * Create an error toast with red styling * @param title - The main title text for the toast * @param subtitle - Optional subtitle text for the toast * @param options - Additional configuration options (variant will be overridden to 'error') * @returns The unique ID of the created toast, or null if no toaster is found * @example * ```typescript * toasterService.error('Failed to Save', 'Please check your connection and try again'); * * // Sticky error that doesn't auto-dismiss * toasterService.error('Critical Error', 'System malfunction detected', { duration: 0 }); * ``` */ error(title: string, subtitle?: string, options?: Omit): string | null; /** * Create a warning toast with yellow/orange styling * @param title - The main title text for the toast * @param subtitle - Optional subtitle text for the toast * @param options - Additional configuration options (variant will be overridden to 'warning') * @returns The unique ID of the created toast, or null if no toaster is found * @example * ```typescript * toasterService.warning('Unsaved Changes', 'You have unsaved changes that will be lost'); * * // Non-dismissible warning * toasterService.warning('Low Storage', 'Running low on space', { dismissible: false }); * ``` */ warning(title: string, subtitle?: string, options?: Omit): string | null; /** * Create an info toast with blue styling (default variant) * @param title - The main title text for the toast * @param subtitle - Optional subtitle text for the toast * @param options - Additional configuration options (variant will be overridden to 'info') * @returns The unique ID of the created toast, or null if no toaster is found * @example * ```typescript * toasterService.info('New Feature Available', 'Check out the new dashboard widgets'); * * // Long-lasting info toast * toasterService.info('Tip', 'Use Ctrl+S to save', { duration: 15000 }); * ``` */ info(title: string, subtitle?: string, options?: Omit): string | null; /** * Remove a specific toast by its ID * @param id - The unique ID of the toast to remove (returned from createToast methods) * @example * ```typescript * const toastId = toasterService.success('Uploading...', 'Please wait'); * // Later, when upload completes: * toasterService.removeToast(toastId); * toasterService.success('Upload Complete', 'File uploaded successfully'); * ``` */ removeToast(id: string): void; clearAll(): void; } export declare const toasterService: ToasterService; export {};