import { RenderFunction } from 'vue'; export declare const DEFAULT_TIMEOUT = 5000; declare enum StatusSeverities { Error = "error", Warning = "warning", Info = "info", Success = "success" } declare type StatusSeverity = `${StatusSeverities}`; export declare type Toast = { id: string; text: string | RenderFunction; status: StatusSeverity; offsetTop?: string; }; declare type ToastIdOrUndefined = O extends { id: string; } ? Toast['id'] | undefined : Toast['id']; export declare interface ToastOptions { /** * The timeout in milliseconds before the toast is automatically dismissed. If set to `false`, the toast will persist until the user clicks on it. * @default DEFAULT_TIMEOUT */ timeout?: number | boolean; /** * A group name ensures only one toast with the same group and status is visible at any given time. * Toasts with the same group but different statuses will be treated as separate and will display concurrently. */ group?: string; /** * The container distance from the top of the viewport. */ offsetTop?: string; } declare function useToasts(globalOptions?: Omit): { active: readonly { readonly id: string; readonly text: string | RenderFunction; readonly status: "error" | "warning" | "info" | "success"; readonly offsetTop?: string | undefined; }[]; remove: { (toastId: Toast['id']): void; (options: { group: string; status: StatusSeverity; }): void; }; create: { (text: Toast['text'], status: StatusSeverity, options?: Omit): Toast['id']; (text: Toast['text'], status: StatusSeverity, options: ToastOptions & { id: string; }): Toast['id'] | undefined; }; removeAll: () => void; error: (text: Toast['text'], options?: O) => ToastIdOrUndefined; info: (text: Toast['text'], options?: O_1 | undefined) => ToastIdOrUndefined; success: (text: Toast['text'], options?: O_2 | undefined) => ToastIdOrUndefined; warning: (text: Toast['text'], options?: O_3 | undefined) => ToastIdOrUndefined; }; export default useToasts; export { }