export type ToastTypes = "default" | "success" | "info" | "warning" | "error" | "loading"; export type ToastContent = string | number | boolean | null | undefined | (() => any) | any; export type ToastToDismiss = { id: number | string; dismiss: boolean; }; export type ToastT = { id: number | string; title?: ToastContent; description?: ToastContent; type?: ToastTypes; duration?: number; dismissible?: boolean; delete?: boolean; onDismiss?: (toast: ToastT) => void; onAutoClose?: (toast: ToastT) => void; }; export type ExternalToast = Omit & { id?: number | string; }; export type PromiseResult = ToastContent | { message: ToastContent; description?: ToastContent; type?: ToastTypes; } | ((data: Data) => ToastContent | Promise); export type PromiseData = ExternalToast & { loading?: ToastContent; success?: PromiseResult; error?: PromiseResult; description?: PromiseResult; finally?: () => void | Promise; };