import { ReactNode } from 'react'; import { TestId } from './utils'; import { ImperativeToast } from './Toast'; export type ToasterProps = { children: ReactNode } & TestId; type AddAction = { type: 'add'; toast: ImperativeToast }; type RemoveAction = { id: string; type: 'remove' }; export type ToasterAction = AddAction | RemoveAction; export type ToasterDispatch = (action: ToasterAction) => void; export type ToasterState = { toasts: ImperativeToast[] }; export type ToasterContextType = { state: ToasterState; dispatch: ToasterDispatch; };