import { ToastOptions, ToastManagerApi, ToastPromiseOptions } from '../toast.types'; /** * ToastManager - Singleton class managing multiple toaster instances per placement. * * Architecture: * - ID-to-placement routing: Tracks which toast ID belongs to which placement * - Convenience methods: info(), success(), warning(), error() methods * - Promise support: promise() method that transitions loading → success/error * - Default duration: 6000ms, consumer-controlled (action does not override) */ declare class ToastManager implements ToastManagerApi { private static instance; private toastPlacements; private constructor(); /** * Get singleton instance of ToastManager. */ static getInstance(): ToastManager; /** * Validate and normalize placement value. */ private normalizePlacement; /** * Create a toast and return its ID. */ create(options: ToastOptions): string; /** * Update an existing toast. */ update(id: string, options: Partial): void; /** * Dismiss toast(s) with exit animation. * If no ID is provided, dismisses all toasts across all placements. */ dismiss(id?: string): void; /** * Remove toast(s) immediately without exit animation. * If no ID is provided, removes all toasts across all placements. */ remove(id?: string): void; info(options: Omit): string; success(options: Omit): string; warning(options: Omit): string; error(options: Omit): string; /** * Create promise toast with loading/success/error states. */ promise(promise: Promise, options: ToastPromiseOptions, config?: Pick): void; /** * Reset manager state (for testing only). * * Clears the ID-to-placement map and resets all underlying toaster * instances so tests start from a clean slate. */ reset(): void; } /** * Imperative toast API. * * @example * ```tsx * // Create toast * const id = toast({ title: "Success", description: "Operation completed", type: "success" }); * * // Convenience methods * toast.info({ title: "Information", description: "Something happened" }); * toast.success({ title: "Success", description: "Operation completed" }); * toast.warning({ title: "Warning", description: "Please review" }); * toast.error({ title: "Error", description: "Something went wrong" }); * * // With variant (default is "solid") * toast.info({ title: "Subtle info", description: "Additional context", variant: "subtle" }); * toast.success({ title: "Bold success", description: "Changes saved", variant: "solid" }); * * // With close button (off by default) * toast.info({ title: "Closable", description: "Can be dismissed", closable: true }); * * // With action button * toast({ * title: "Action required", * description: "File was deleted", * action: { label: "Undo", onPress: () => {} } * }); * * // Promise pattern * toast.promise(fetchData(), { * loading: { title: "Loading...", description: "Please wait" }, * success: { title: "Done!", description: "Data loaded" }, * error: { title: "Failed!", description: "Could not load data" } * }); * * // Dismiss * toast.dismiss(id); * toast.dismiss(); // Dismiss all * * // Remove immediately * toast.remove(id); * toast.remove(); // Remove all * ``` */ export declare const toast: ((options: ToastOptions) => string) & { info: (options: Omit) => string; success: (options: Omit) => string; warning: (options: Omit) => string; error: (options: Omit) => string; promise: (promise: Promise, options: ToastPromiseOptions, config?: Pick) => void; update: (id: string, options: Partial) => void; dismiss: (id?: string) => void; remove: (id?: string) => void; reset: () => void; }; export { ToastManager };