import type { ReactNode } from "react"; import type { ToastPlacement } from "./ToastRegion.js"; export interface ToastProviderProps { /** Max simultaneous toasts; the oldest is evicted first. @default 3 */ limit?: number; /** Auto-dismiss for toasts with no action, in ms. @default 5000 */ duration?: number; /** Auto-dismiss for toasts carrying an action, in ms. An affordance that * vanishes before it can be reached is not an affordance. @default 10000 */ actionDuration?: number; /** Corner the stack occupies. @default "bottom-end" */ placement?: ToastPlacement; /** The subtree that may call `useToast()`. The region is rendered alongside it. */ children: ReactNode; } /** Owns the toast queue, its auto-dismiss timers, and the single ToastRegion * (D65). * * This is the library's one stateful container, and the exception is * deliberately narrow. D50 and D53 rejected internal state for Dialog and Menu * because the consumer already owned the state that decided visibility — a * menu is open because a user clicked a trigger the consumer rendered. A toast * has no such owner: it is created by an outcome, not by a UI state, and it * disappears on a timer nobody is watching. The rule that survives is the * useful half — presentational components stay controlled (`Toast` still holds * nothing), a stateful container may exist when the state has no natural * owner, and it must be opt-in. * * Timers pause while the pointer or focus is inside the region (WCAG 2.2.1), * and resume with the time *remaining* rather than a fresh full duration — * restarting would let a user hold a toast open indefinitely by jiggling the * mouse. */ export declare function ToastProvider({ limit, duration, actionDuration, placement, children, }: ToastProviderProps): import("react").JSX.Element; //# sourceMappingURL=ToastProvider.d.ts.map