import { HTMLAttributes, ReactNode } from 'react'; import { AlertProps } from '../Alert/types'; export declare type ToastPosition = 'top' | 'start' | 'end' | 'bottom' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end'; export declare type ToastOptionsProp = { /** * Default duration for toasts to show, set null to keep it shown * @default 3000 */ duration?: number | null; /** * Position to show toast * @default 'top' */ position?: ToastPosition; /** * Show close btn, can be overridden at toast action level * @default 'true' */ closable?: boolean; onClose?: () => {}; alertProps?: AlertProps; action?: ReactNode; }; export declare type ToastTypeProp = 'success' | 'error' | 'warning' | 'info' | 'basic' | 'primary' | 'secondary' | 'light' | 'dark'; export interface ToastItem { message: string; options?: ToastOptionsProp; type?: ToastTypeProp; id?: any; } export declare type ToastItems = ToastItem[] | null; export declare type ToastCommonProp = (message: string, options?: ToastOptionsProp) => void; export interface ToastDispatch { show(message: string, options?: ToastOptionsProp, type?: ToastTypeProp): void; success(message: string, options?: ToastOptionsProp): void; error(message: string, options?: ToastOptionsProp): void; warning(message: string, options?: ToastOptionsProp): void; info(message: string, options?: ToastOptionsProp): void; basic(message: string, options?: ToastOptionsProp): void; primary(message: string, options?: ToastOptionsProp): void; secondary(message: string, options?: ToastOptionsProp): void; light(message: string, options?: ToastOptionsProp): void; dark(message: string, options?: ToastOptionsProp): void; clear(): void; remove(item: ToastItem): void; } export interface ToasterProps { /** * Default duration for toasts to show, set null to keep it shown, can be overridden at toast action level * @default 3000 */ duration?: number | null; /** * Default position for toasts, can be overridden at toast action level * @default 'top' */ position?: ToastPosition; /** * Show close btn, can be overridden at toast action level * @default 'true' */ closable?: boolean; alertProps?: AlertProps; /** * @default 'dark' */ defaultType?: ToastTypeProp; } export interface ToasterListProps extends ToasterProps, Pick, 'className'> { items?: ToastItems; } export interface ToastAlertProps { item: ToastItem; } export interface ToastProviderProps extends ToasterProps { children?: any; }