import * as React from "react"; import { type ToasterProps as FluentToasterProps, type ToastProps as FluentToastProps, type ToastTitleProps as FluentToastTitleProps, type ToastBodyProps as FluentToastBodyProps, type ToastTriggerProps as FluentToastTriggerProps } from "@fluentui/react-toast"; /** * Toaster component - Container for toast notifications * * A Toasts displays temporary content to the user. Toasts are rendered as a separate surface * that can be dismissed by user action or an application timeout. Toasts are typically used in * the following situations: * - Update the user on the status of a task * - Display the progress of a task * - Notify the user to take an action * - Notify the user of an application update * - Warn the user of an error */ export interface ToasterProps extends Omit { /** * Position of the toaster on the screen * @default "bottom-end" */ position?: "top-start" | "top-end" | "bottom-start" | "bottom-end" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "center"; } declare const Toaster: React.ForwardRefExoticComponent>; /** * Toast component - Individual toast notification * * @example * ```tsx * * Success * Your operation was successful. * * ``` */ export interface ToastProps extends FluentToastProps { /** * Toast ID for dismissal (optional, will be auto-generated if not provided) */ toastId?: string; /** * Whether to show the close button * @default true */ showCloseButton?: boolean; /** * Toaster ID to use for dismissal (optional) */ toasterId?: string; /** * Position of the toaster (for animation direction) */ position?: "top-start" | "top-end" | "bottom-start" | "bottom-end" | "center"; } declare const Toast: React.ForwardRefExoticComponent>; /** * ToastTitle component - Title text for the toast */ export interface ToastTitleProps extends FluentToastTitleProps { /** * Intent type to show appropriate icon */ intent?: "success" | "error" | "warning" | "info"; } declare const ToastTitle: React.ForwardRefExoticComponent>; /** * ToastBody component - Body text for the toast */ export interface ToastBodyProps extends FluentToastBodyProps { } declare const ToastBody: React.ForwardRefExoticComponent>; /** * ToastTrigger component - Trigger element for showing a toast */ export interface ToastTriggerProps extends FluentToastTriggerProps { /** * Whether to render as a child element * @default false */ asChild?: boolean; } declare const ToastTrigger: React.ForwardRefExoticComponent>; /** * useToast hook - Hook for programmatically showing toasts * * @example * ```tsx * const { dispatchToast, success } = useToast(); * * const showSuccessToast = () => { * success("Operation completed", "Your changes have been saved successfully."); * }; * ``` */ export interface UseToastOptions { /** * Toast intent */ intent?: "success" | "error" | "warning" | "info"; /** * Timeout in milliseconds * @default 7000 */ timeout?: number; /** * Toast ID (for manual dismissal) */ toastId?: string; /** * Position for animation direction */ position?: "top-start" | "top-end" | "bottom-start" | "bottom-end" | "center"; } export interface UseToastReturn { /** * Dispatch a new toast */ dispatchToast: (content: React.ReactNode, options?: { intent?: "success" | "error" | "warning" | "info"; timeout?: number; toastId?: string; }) => void; /** * Show a success toast */ success: (title: string, body?: string, options?: Omit) => void; /** * Show an error toast */ error: (title: string, body?: string, options?: Omit) => void; /** * Show a warning toast */ warning: (title: string, body?: string, options?: Omit) => void; /** * Show an info toast */ info: (title: string, body?: string, options?: Omit) => void; /** * Dismiss a toast by ID */ dismissToast: (toastId: string) => void; /** * Dismiss all toasts */ dismissAllToasts: () => void; /** * Pause a toast (prevents auto-dismiss) */ pauseToast: (toastId: string) => void; /** * Resume/play a toast (resumes auto-dismiss) */ playToast: (toastId: string) => void; /** * Update a toast */ updateToast: (options: { toastId: string; content: React.ReactNode; intent?: "success" | "error" | "warning" | "info"; timeout?: number; }) => void; } export declare function useToast(toasterId?: string): UseToastReturn; export { Toaster, Toast, ToastTitle, ToastBody, ToastTrigger }; export type { FluentToasterProps, FluentToastProps, FluentToastTitleProps, FluentToastBodyProps, FluentToastTriggerProps, }; //# sourceMappingURL=toaster.d.ts.map