import { Id, ToastContent, ToastItemProps } from '../components/ToastItem/ToastItem.types'; import { ContainerInstance } from '../hooks/useToastContainer'; export declare const enum Event { Show = 0, Clear = 1, DidMount = 2, WillUnmount = 3 } type OnShowCallback = (content: ToastContent, options: ToastItemProps) => void; type OnClearCallback = (id?: Id) => void; type OnDidMountCallback = (containerInstance: ContainerInstance) => void; type OnWillUnmountCallback = OnDidMountCallback; type Callback = OnShowCallback | OnClearCallback | OnDidMountCallback | OnWillUnmountCallback; type TimeoutId = ReturnType; export type EventManager = { list: Map; emitQueue: Map; on(event: Event.Show, callback: OnShowCallback): EventManager; on(event: Event.Clear, callback: OnClearCallback): EventManager; on(event: Event.DidMount, callback: OnDidMountCallback): EventManager; on(event: Event.WillUnmount, callback: OnWillUnmountCallback): EventManager; off(event: Event, callback?: Callback): EventManager; cancelEmit(event: Event): EventManager; emit(event: Event.Show, content: React.ReactNode, options: ToastItemProps): void; emit(event: Event.Clear, id?: string | number): void; emit(event: Event.DidMount, containerInstance: ContainerInstance): void; emit(event: Event.WillUnmount, containerInstance: ContainerInstance): void; }; export declare const eventManager: EventManager; export {}; //# sourceMappingURL=eventManager.d.ts.map