import { NotificationCardProps } from '../NotificationCard'; import { default as React } from 'react'; import { NotificationLoaderType } from './PLNotificationsList'; export interface usePyrionNotificationsProps { notificationsListControls?: React.RefObject | null>; } export interface NotificationsListControlsHandler { addNewNotification: (notification: NotificationCardProps | NotificationCardProps[], position?: 'top' | 'bottom') => void; subscribeToUpdates: (callback: (notifications: NotificationCardProps[], count: { total: number; unread: number; }) => void) => () => void; removeNotification: (id: string | string[]) => void; removeAllNotifications: () => void; setNotifications: (notifications: NotificationCardProps[] | ((notifications: NotificationCardProps[]) => NotificationCardProps[])) => void; setLoading: (loading: boolean, type: NotificationLoaderType) => void; setError: (hasError: boolean, children?: React.ReactNode | (() => React.ReactNode)) => void; } export type LoadingState = { isLoading: boolean; type: NotificationLoaderType; }; export type ErrorState = { hasError: boolean; children?: React.ReactNode | (() => React.ReactNode); }; declare const usePyrionNotifications: (props: usePyrionNotificationsProps) => { notifications: NotificationCardProps[]; loadingState: LoadingState; errorState: ErrorState; }; export default usePyrionNotifications;