import { Key, ReactNode } from 'react'; export interface NotifierConfig { /** * If passed as number, the notification will be closed after the amount of time. */ duration?: number | false; maxCount?: number; } export interface NotifierData extends Pick { /** * The notification content. */ children?: ReactNode; /** * Close Handler */ onClose?: (key: Key) => void; } export type RenderNotifier = (notifier: N & { key: Key; }) => ReactNode; export interface Notifier { add: (notifier: N & { key?: Key; }) => Key; config: (configs: C) => void; destroy: VoidFunction; remove: (key: Key) => void; getConfig: () => C; }