import { AlertColor, SizeAlert, VariantAlert, AnimationAlert } from './alert'; import { IconType, AnyIconDefinition } from './types'; export type MessagePosition = 'top-left' | 'top-center' | 'top-right' | 'center-left' | 'center' | 'center-right' | 'bottom-left' | 'bottom-center' | 'bottom-right'; export type MessageType = 'toast' | 'notification'; export type MessageColor = AlertColor | 'brand'; export interface BaseMessageProps { id: number; message?: string; title?: string; description?: string; color: MessageColor; variant?: VariantAlert; size?: SizeAlert; position?: MessagePosition; duration?: number; showCloseButton?: boolean; isLeaving?: boolean; animation?: AnimationAlert; onClick?: () => void; onClose?: () => void; onPrimaryClick?: () => void; onSecondaryClick?: () => void; primaryButtonText?: string; secondaryButtonText?: string; } export interface BaseMessageOptions { title?: string; description?: string; position?: MessagePosition; duration?: number; showCloseButton?: boolean; variant?: VariantAlert; size?: SizeAlert; animation?: AnimationAlert; onClick?: () => void; onClose?: () => void; onPrimaryClick?: () => void; onSecondaryClick?: () => void; primaryButtonText?: string; secondaryButtonText?: string; } export interface BaseMessageConfig { maxMessages: number; position: MessagePosition; duration: number; animationDuration: number; variant: VariantAlert; primaryButtonText: string; secondaryButtonText: string; size: SizeAlert; } export type MessageListener = (message: T) => void; export type MessagesByPosition = Partial>; export interface ToastProps extends BaseMessageProps { type?: 'toast'; } export interface ToastOptions extends BaseMessageOptions { message?: string; } export interface ToastConfig extends BaseMessageConfig { progressBarColor?: boolean; } export type NotificationColor = 'brand' | 'neutral'; export type NotificationSize = 'sm' | 'md' | 'lg'; export interface NotificationAction { label: string; onClick: () => void; variant?: 'primary' | 'secondary' | 'ghost'; } export interface NotificationProps extends Omit { type?: 'notification'; color: NotificationColor; avatar?: string; icon?: IconType | AnyIconDefinition; subtitle?: string; count?: number; timerProgress?: number; showTimer?: boolean; } export interface NotificationOptions extends BaseMessageOptions { message?: string; avatar?: string; icon?: IconType | AnyIconDefinition; subtitle?: string; } export interface NotificationGroup { color: NotificationColor; notification: NotificationProps; queue: NotificationProps[]; count: number; timerId?: NodeJS.Timeout; timerProgress: number; isLeaving: boolean; } export type NotificationGroupsByPosition = Partial>>; export interface NotificationConfig { position: MessagePosition; duration: number; animationDuration: number; size: NotificationSize; showTimer: boolean; } export type MessageInput = string | (BaseMessageOptions & { message?: string; }); export type ToastPosition = MessagePosition; export type ToastsByPosition = MessagesByPosition; export type ToastListener = MessageListener; //# sourceMappingURL=message.d.ts.map