import { ThunkAction } from 'redux-thunk'; import { Snackbar } from './Snackbar'; /** * Creates action that adds new snackbar to the queue (we should display only one snackbar at once). */ export declare const SNACKBAR_QUEUED = "@@redux-snackbar/SNACKBAR_QUEUED"; export declare type SnackbarQueuedAction = { type: typeof SNACKBAR_QUEUED; payload?: Snackbar; }; export declare const snackbarQueued: (snackbar: Snackbar) => SnackbarQueuedAction; /** * Creates action that opens queued snackbar. */ export declare const SNACKBAR_OPENED = "@@redux-snackbar/SNACKBAR_OPENED"; export declare type SnackbarOpenedAction = { type: typeof SNACKBAR_OPENED; payload?: { id: Snackbar['id']; timeoutId?: any; }; }; export declare const snackbarOpened: (id: string, timeoutId?: any) => SnackbarOpenedAction; /** * Creates action that closes opened snackbar. */ export declare const SNACKBAR_CLOSED = "@@redux-snackbar/SNACKBAR_CLOSED"; export declare type SnackbarClosedAction = { type: typeof SNACKBAR_CLOSED; payload?: Snackbar['id']; }; export declare const snackbarClosed: (id: string) => SnackbarClosedAction; /** * Creates action that removes closed snackbar. */ export declare const SNACKBAR_REMOVED = "@@redux-snackbar/SNACKBAR_REMOVED"; export declare type SnackbarRemovedAction = { type: typeof SNACKBAR_REMOVED; payload?: Snackbar['id']; }; export declare const snackbarRemoved: (id: string) => SnackbarRemovedAction; /** * Creates thunk action that opens snackbar (this action handles queueing and opening snackbar). */ export declare const openSnackbar: (message: string, timeout?: number, unique?: boolean) => ThunkAction; /** * Creates thunk action that closes snackbar * (this action handles closing, removing and taking next snackbar from the queue). */ export declare const closeSnackbar: (id: string) => ThunkAction; export declare type SnackbarActions = SnackbarQueuedAction | SnackbarOpenedAction | SnackbarClosedAction | SnackbarRemovedAction;