import type { RcSnackbarContentProps } from '@ringcentral/juno'; import type { DOMAttributes, FunctionComponent } from 'react'; import type React from 'react'; export interface NotificationMessage { id: string; message: string; level: 'info' | 'success' | 'warning' | 'danger'; payload: any; ttl: number; timestamp: number; /** * snackbar animation */ animation?: string; /** * has backdrop behind whole window */ backdrop?: boolean; /** * backdrop animation */ backdropAnimation?: string; /** * classes for whole component */ classes?: { backdrop?: string; snackbar?: RcSnackbarContentProps['classes']; }; /** emit event when backdrop to be click */ onBackdropClick?: DOMAttributes['onClick']; /** * loading state */ loading: boolean; /** * right action area */ action?: React.ReactNode; } export type NotificationItemProps = { data: NotificationMessage; currentLocale: string; brand: string; dismiss: (id: string) => void; getRenderer(type: NotificationMessage): FunctionComponent; duration?: number; } & Pick & Pick; export type NotificationPanelProps = { messages: NotificationMessage[]; exitAnimation?: string; entranceAnimation?: string; backdropEntranceAnimation?: string; backdropExitAnimation?: string; className?: string; currentLocale: string; brand: string; } & Omit;