import { Toast } from './'; export enum ActionType { ADD_TOAST, UPDATE_TOAST, UPSERT_TOAST, DISMISS_TOAST, REMOVE_TOAST, START_PAUSE, END_PAUSE, } export type Action = | { type: ActionType.ADD_TOAST; toast: Toast; } | { type: ActionType.UPSERT_TOAST; toast: Toast; } | { type: ActionType.UPDATE_TOAST; toast: Partial; } | { type: ActionType.DISMISS_TOAST; toastId?: string; } | { type: ActionType.REMOVE_TOAST; toastId?: string; } | { type: ActionType.START_PAUSE; time: number; } | { type: ActionType.END_PAUSE; time: number; }; export interface State { toasts: Toast[]; pausedAt: number | undefined; }