import { Component, PropType, ExtractPropTypes } from 'vue'; export type MessageType = 'success' | 'warning' | 'danger' | 'info' | 'default' | 'loading'; export type MessagePosition = 'top-center' | 'top-left' | 'top-right' | 'bottom-center' | 'bottom-left' | 'bottom-right'; export interface MessageAction { text: string; onClick: () => void; } export interface MessageOptions { id?: string; message: string; type?: MessageType; duration?: number; closable?: boolean; showIcon?: boolean; icon?: Component | string; plain?: boolean; grouping?: boolean; offset?: number; position?: MessagePosition; showProgress?: boolean; dangerouslyUseHTMLString?: boolean; action?: MessageAction; background?: string; color?: string; borderColor?: string; iconColor?: string; progressColor?: string; borderRadius?: string; shadow?: string; customClass?: string; customStyle?: Partial; onClose?: () => void; } export interface MessageHandle { close: () => void; update: (opts: Partial) => void; then: (fn: () => void) => void; } export interface MessageInstance { id: string; el: HTMLDivElement; progressEl: HTMLDivElement | null; close: () => void; update: (opts: Partial) => void; options: ResolvedMessageOptions; timer: ReturnType | null; progressTimer: ReturnType | null; startTime: number; remainingDuration: number; repeatCount: number; onCloseCallbacks: Array<() => void>; } export type ResolvedMessageOptions = Required> & MessageOptions; export declare const messageProps: { readonly message: { readonly type: StringConstructor; readonly default: ""; }; readonly type: { readonly type: PropType; readonly default: "default"; }; readonly duration: { readonly type: NumberConstructor; readonly default: 3000; }; readonly closable: { readonly type: BooleanConstructor; readonly default: false; }; readonly showIcon: { readonly type: BooleanConstructor; readonly default: true; }; readonly icon: { readonly type: PropType; readonly default: undefined; }; readonly plain: { readonly type: BooleanConstructor; readonly default: false; }; readonly grouping: { readonly type: BooleanConstructor; readonly default: false; }; readonly offset: { readonly type: NumberConstructor; readonly default: 16; }; readonly position: { readonly type: PropType; readonly default: "top-center"; }; readonly showProgress: { readonly type: BooleanConstructor; readonly default: false; }; readonly dangerouslyUseHTMLString: { readonly type: BooleanConstructor; readonly default: false; }; readonly customClass: { readonly type: StringConstructor; readonly default: ""; }; }; export type MessageProps = ExtractPropTypes;