import * as React from "react"; import type { NotificationMessage, NotificationOptions, NotificationState } from "./types"; export interface NotificationMethods { notify: (message: NotificationMessage, options: CreateNotificationOptions) => React.Key; closeAll: () => void; close: (id: React.Key) => void; update: (id: React.Key, options: CreateNotificationOptions) => void; isActive: (id: React.Key) => boolean; } interface Props { notify: (methods: NotificationMethods) => void; } declare type CreateNotificationOptions = Partial; /** * Manages the creation, and removal of notifications * across all corners ("top", "bottom", etc.) */ export declare class NotificationManager extends React.Component { /** * Static id counter to create unique ids * for each notification */ static counter: number; /** * State to track all the notification */ state: NotificationState; constructor(props: Props); /** * Function to actually create a notification */ notify: (message: NotificationMessage, options: CreateNotificationOptions) => React.Key; /** * Update a specific notification with new options based on the * passed `id` */ updateNotification: (id: React.Key, options: CreateNotificationOptions) => void; /** * Close all notifications at once. */ closeAll: () => void; /** * Create properties for a new notification */ createNotification: (message: NotificationMessage, options: CreateNotificationOptions) => NotificationOptions; /** * Requests to close a notification based on its id */ closeNotification: (id: React.Key) => void; /** * Hide a notification using showing properity */ removeNotification: (id: React.Key) => void; isVisible: (id: React.Key) => boolean; render(): JSX.Element; } export {};