export type ToastVariant = "neutral" | "warning" | "error" | "success"; export type ToastAction = { label: string; onClick: () => void; }; export interface ToastOptions { /** * The type of the toast to show. */ variant: ToastVariant; /** * The title of the toast. */ title: string; /** * The text that will be displayed below the title. */ text?: string; /** * An optional action to be displayed at the bottom of the toast. */ action?: ToastAction; /** * The duration in milliseconds after which the toast will be automatically dismissed. * * Defaults to 4,000 milliseconds. * @default 4_000 */ durationMs?: number; /** * Whether the toast should be dismissible by the user. * * Defaults to `true`. * @default true */ dismissable?: boolean; /** * The progress of the toast (0-100). * * If provided, the toast will display a progress bar. */ progress?: number; } export type ToastUpdateOptions = Partial> & { variant?: ToastVariant; action?: ToastAction | null; }; /** * Shows a toast notification to the user. * * @example * * import {showToast} from "attio/client"; * * showToast({ * variant: "success", * title: "Invoice sent", * text: "Invoice sent successfully", * action: { * label: "View invoice", * onClick: () => { * // ... * }, * }, * }); */ export declare function showToast(options: ToastOptions): Promise<{ hideToast: () => Promise; updateToast: (options: ToastUpdateOptions) => Promise; upsertToast: (options: ToastUpdateOptions) => Promise; }>; //# sourceMappingURL=show-toast.d.ts.map