import { StoreonStore } from 'storeon'; import { NotificationDefaultArgs, NotificationProps } from './Notification.types'; export type NotificationItem = { id: string; isHidden?: boolean; }; export type NotificationsState = { notifications: NotificationItem[]; }; export type NotificationsEvents = { add: NotificationItem; hide: string; remove: string; }; export type NotificationsStoreInstance = StoreonStore; export type AddNotification = (props?: NotificationProps, timeout?: number | null) => string; export type CloseNotification = (id: string, delay?: number) => void; export type GetNotificationDefaultArgs = () => NotificationDefaultArgs | undefined; /** * Создает хранилище с ключом `notifications` к массиву с окнами. */ export declare const createNotificationsStore: () => StoreonStore; export declare const NotificationsStore: StoreonStore; export declare const createNotificationsApi: (store: NotificationsStoreInstance, getDefaultArgs?: GetNotificationDefaultArgs) => { addNotification: AddNotification; closeNotification: CloseNotification; }; /** * Связывает дефолтные параметры провайдера, отображающего глобальный портал, с глобальным API. */ export declare const registerGlobalDefaultNotificationArgs: (getArgs: GetNotificationDefaultArgs) => () => void; export declare const GlobalNotificationsApi: { addNotification: AddNotification; closeNotification: CloseNotification; }; export declare const closeNotification: CloseNotification; /** * Открыть новое оповещение. * @param props Пропсы всплывающего оповещения * @return Идентификатор нового оповещения */ export declare const addNotification: AddNotification; //# sourceMappingURL=NotificationsStore.d.ts.map