import { type IToastOptions } from '@breadstone/mosaik-elements-foundation'; /** * Represents the return type of the `useToast` hook. * * @public */ export interface IUseToastReturn { /** * Opens a toast with the specified options. * * @template TResult - Expected return type of the resolved toast result. * @param options - Toast configuration options. * @returns Promise resolving to the toast result. */ open(options?: IToastOptions): Promise; /** * Closes a toast by its identifier. * * @template TResult - Type of the result to return. * @param toastId - The identifier of the toast to close. * @param result - Optional result to pass to the toast opener. * @returns Promise that resolves when the toast is closed. */ close(toastId: string, result?: TResult): Promise; } /** * React hook for managing toasts using the foundation ToastService singleton. * * @remarks * This hook provides a React-idiomatic interface to the foundation ToastService. * The service should be configured at application startup using `ToastService.configure()`. * * @example * ```tsx * // In your app setup * ToastService.configure({ * closeOnNavigation: true, * behaviors: [] * }); * * // In your component * function MyComponent() { * const toast = useToast(); * * const handleSuccess = async () => { * await toast.open({ * header: 'Success', * content: 'Operation completed successfully', * variant: 'success', * timeout: Toast.Timeout.SHORT * }); * }; * * return ; * } * ``` * * @public * @returns An object containing toast management functions. */ export declare function useToast(): IUseToastReturn; //# sourceMappingURL=useToast.d.ts.map