/**
* Toast: transient notification messages. A `ToastProvider` holds the queue and
* renders a viewport; `useToast()` enqueues messages from anywhere inside the
* provider. The queue mechanics come from the active adapter's `toast` slot: the
* zero-dependency builtin by default, swappable to Sonner / react-hot-toast via
* `UIAdapterProvider`. The visual surface + option types live in `toast-parts.tsx`
* (re-exported here); this file is the thin, adapter-routed public entry.
*
* @module react/components/ui/toast
*
* @example
* ```tsx
* import { ToastProvider, useToast } from "veryfront/ui";
*
* function SaveButton() {
* const { toast } = useToast();
* return (
*
* );
* }
*
* export function App() {
* return (
*
*
*
* );
* }
* ```
*/
import * as React from "react";
import type { ToastProviderProps, ToastState, ToastViewportProps } from "./adapter/contract.js";
export { Toast, type ToastAction, ToastClose, ToastDescription, type ToastFn, type ToastOptions, type ToastProps, ToastTitle, type ToastVariant, } from "./toast-parts.js";
export type { ToastProviderProps, ToastViewportProps } from "./adapter/contract.js";
/**
* Holds the toast queue (via the active adapter: builtin by default) and mounts
* the viewport. Wrap the part of the app that needs notifications.
*/
export declare function ToastProvider({ children, duration, maxToasts, viewport }: ToastProviderProps): React.ReactElement;
export declare namespace ToastProvider {
var displayName: string;
}
/** Render the active adapter's viewport for ``. */
export declare function ToastViewport(props: ToastViewportProps): React.ReactElement;
export declare namespace ToastViewport {
var displayName: string;
}
/**
* Returns `{ toast, dismiss }`. Call `toast(options)` to enqueue (returns the new
* id), `toast.custom((id) => node)` for a fully custom toast, and `dismiss(id)` to
* remove one early. Must be used within a `ToastProvider`.
*/
export declare function useToast(): ToastState;
//# sourceMappingURL=toast.d.ts.map