import * as React$1 from "react"; import { Toast, ToastManagerAddOptions } from "@base-ui/react/toast"; //#region src/components/toast.d.ts type ToastData = { tooltipStyle?: boolean; }; declare const TOAST_RIGHT_OFFSET_VAR = "--stella-toast-right-offset"; declare const TOAST_ICONS: { readonly error: React$1.JSX.Element; readonly info: React$1.JSX.Element; readonly loading: null; readonly neutral: null; readonly success: React$1.JSX.Element; readonly warning: React$1.JSX.Element; }; type ToastType = keyof typeof TOAST_ICONS; type ToastAction = { label: React$1.ReactNode; onClick?: React$1.MouseEventHandler; }; type ToastActionProps = ToastManagerAddOptions["actionProps"]; type ToastOptions = Omit, "actionProps" | "title" | "type"> & { action?: ToastAction; actionProps?: ToastActionProps; }; type ToastUpdateOptions = Partial & { title?: React$1.ReactNode | undefined; type?: ToastType | undefined; }; type ToastPromiseMessage = React$1.ReactNode | ToastUpdateOptions; type ToastPromiseOptions = { error: ToastPromiseMessage | ((error: unknown) => ToastPromiseMessage); loading: ToastPromiseMessage; success: ToastPromiseMessage | ((value: Value) => ToastPromiseMessage); }; type ToastApi = { (title: React$1.ReactNode, options?: ToastOptions): string; add: (options: ToastAddOptions) => string; close: (id?: string) => void; dismiss: (id?: string) => void; error: (title: React$1.ReactNode, options?: ToastOptions) => string; info: (title: React$1.ReactNode, options?: ToastOptions) => string; loading: (title: React$1.ReactNode, options?: ToastOptions) => string; promise: (promiseValue: Promise, options: ToastPromiseOptions) => Promise; success: (title: React$1.ReactNode, options?: ToastOptions) => string; update: (id: string, options: ToastUpdateOptions) => void; warning: (title: React$1.ReactNode, options?: ToastOptions) => string; }; type ToastAddOptions = ToastUpdateOptions & { title: React$1.ReactNode; }; type ToastPosition = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right"; type ToastProviderProps = { position?: ToastPosition; } & Toast.Provider.Props; declare const stellaToast: ToastApi; declare const ToastProvider: ({ children, position, ...props }: ToastProviderProps) => React$1.JSX.Element; declare const AnchoredToastProvider: ({ children, ...props }: Toast.Provider.Props) => React$1.JSX.Element; /** * The same message raised again refreshes the toast already on screen (and * restarts its timer) instead of stacking a copy. Only plain-text messages * without an action merge: an action belongs to the call that raised it, and * a loading toast is owned by the promise that will settle it. */ declare function toastDedupeId({ action, actionProps, description, title, type }: Pick): string | undefined; /** * How long the countdown runs, or `undefined` when the toast stays until * dismissed (errors, loading, timeout 0). */ declare function toastCountdownMs({ timeout, type }: { timeout?: number | undefined; type?: string | undefined; }): number | undefined; //#endregion export { AnchoredToastProvider, TOAST_RIGHT_OFFSET_VAR, type ToastPosition, ToastProvider, stellaToast, toastCountdownMs, toastDedupeId };