import { CSSProperties } from 'react'; import { ToastPlacement } from "./helpers"; export type ToastLayout = { padding?: CSSProperties['padding']; margin?: CSSProperties['margin']; width?: CSSProperties['width']; maxWidth?: CSSProperties['maxWidth']; maxHeight?: CSSProperties['maxHeight']; placement?: ToastPlacement; }; export interface ToastInput { text: React.ReactNode; description?: React.ReactNode; action?: (toast: ToastInstance) => React.ReactNode; isLoading?: boolean; id?: string; delay?: number; } export type ToastInstance = { open: boolean; cancel: () => void; _timeout: null | number; _internalIdent: string; }; export type Toast = ToastInput & Required> & ToastInstance; export type ToastHooksResult = { toasts: Array; setToast: (toast: ToastInput) => void; removeAll: () => void; findToastOneByID: (ident: string) => Toast | undefined; removeToastOneByID: (ident: string) => void; };