import type { ToastLayout, ToastOptions, ToastPosition, ToastRecord, ToastType } from './types'; type ToastDefaults = ToastOptions & { types?: Partial>; }; type Subscriber = (toasts: ToastRecord[]) => void; export declare const DEFAULT_DURATION = 4000; export declare const DEFAULT_VISIBLE_TOASTS = 5; /** * Framework-agnostic toast state. * * Deliberately free of React imports so `toast()` works from anywhere — * module scope, event handlers, before the `` has mounted. * Timers are `setTimeout`-based, so they keep running in background tabs. */ export declare class ToastStore { private toasts; private history; private subscribers; private timers; private defaults; private limit; private paused; private counter; private overrides; /** Mounted `` instances, in mount order. */ private renderers; /** * Register a mounted ``. Only the first one still mounted paints * the toasts, so a second `` (a stray one in a nested layout, say) * cannot double-render every toast. */ claimRenderer(token: symbol): () => void; /** Force subscribers to re-render even though the toast list is unchanged. */ private bump; /** True for the one instance that should render. */ isActiveRenderer(token: symbol): boolean; subscribe(subscriber: Subscriber): () => void; private notify; /** A copy, so a caller cannot corrupt the queue by mutating what it gets. */ getToasts(): ToastRecord[]; /** The slice that should actually be rendered; the rest are queued. */ getVisibleToasts(): ToastRecord[]; getHistory(): ToastRecord[]; setLimit(limit: number): void; setDefaults(defaults: ToastDefaults | undefined): void; /** Is this toast still queued or on screen? */ isActive(id: string | number): boolean; /** * Runtime overrides for the mounted ``, so `useToast()` can still * move the toast region the way it could in v4. */ setOverrides(patch: { position?: ToastPosition; layout?: ToastLayout; }): void; getOverrides(): { position?: ToastPosition; layout?: ToastLayout; }; /** Pause every running timer, banking the time left. */ pause(): void; /** Resume every paused timer with only its banked time left. */ resume(): void; isPaused(): boolean; private runTimer; private clearTimer; /** * Start timers for visible toasts, stop them for queued ones. * Queued toasts must not burn their duration while off-screen. */ private syncTimers; private resolveType; /** * Add a toast, or patch an existing one when `id` is already present. * Returns the toast id. */ add(options: ToastOptions & { type?: ToastType; }): string; /** Patch a toast in place, preserving fields the patch does not mention. */ update(id: string | number, patch: ToastOptions & { type?: ToastType; }): void; /** * Dismiss one toast, or every toast when `id` is omitted. * Fires `onDismiss` — not `onAutoClose`. */ dismiss(id?: string | number): void; /** Remove a toast without firing dismissal callbacks. */ remove(id: string | number): void; private close; /** Drop all state. Intended for tests and hot reloads. */ reset(): void; } /** The single shared store instance backing the `toast()` API. */ export declare const store: ToastStore; export {};