import type { AppContext, Component, ExtractPublicPropTypes, VNode } from 'vue'; import type Notification from './notification.vue'; export declare const notificationTypes: readonly ["primary", "success", "info", "warning", "error"]; export type NotificationType = (typeof notificationTypes)[number] | ''; export type NotificationPosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'; export interface NotificationProps { /** * @description custom class name for Notification */ customClass?: string; /** * @description whether `message` is treated as HTML string */ dangerouslyUseHTMLString?: boolean; /** * @description duration before close. It will not automatically close if set 0 */ duration?: number; /** * @description custom icon component. It will be overridden by `type` */ icon?: string | Component; /** * @description notification dom id */ id?: string; /** * @description description text */ message?: string | VNode | (() => VNode); /** * @description offset from the top edge of the screen. Every Notification instance of the same moment should have the same offset */ offset?: number; /** * @description callback function when notification clicked */ onClick?: () => void; /** * @description callback function when closed */ onClose: () => void; /** * @description custom position */ position?: NotificationPosition; /** * @description whether to show a close button */ showClose?: boolean; /** * @description title */ title?: string; /** * @description notification type */ type?: NotificationType; /** * @description initial zIndex */ zIndex?: number; /** * @description custom close icon, default is Close */ closeIcon?: string | Component; } /** * @deprecated Removed after 3.0.0, Use `NotificationProps` instead. */ export declare const notificationProps: { readonly customClass: import("element-plus/es/utils").EpPropFinalized; readonly dangerouslyUseHTMLString: BooleanConstructor; readonly duration: import("element-plus/es/utils").EpPropFinalized; readonly icon: { readonly type: import("vue").PropType (string | Component) & {}) | (() => string | Component) | ((new (...args: any[]) => (string | Component) & {}) | (() => string | Component))[], unknown, unknown>>; readonly required: false; readonly validator: ((val: unknown) => boolean) | undefined; __epPropKey: true; }; readonly id: import("element-plus/es/utils").EpPropFinalized; readonly message: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => string | VNode | (() => VNode)) | (() => string | VNode | (() => VNode)) | ((new (...args: any[]) => string | VNode | (() => VNode)) | (() => string | VNode | (() => VNode)))[], unknown, unknown, "", boolean>; readonly offset: import("element-plus/es/utils").EpPropFinalized; readonly onClick: import("element-plus/es/utils").EpPropFinalized<(new (...args: any[]) => () => void) | (() => () => void) | { (): () => void; new (): any; readonly prototype: any; } | ((new (...args: any[]) => () => void) | (() => () => void) | { (): () => void; new (): any; readonly prototype: any; })[], unknown, unknown, () => undefined, boolean>; readonly onClose: { readonly type: import("vue").PropType<() => void>; readonly required: true; readonly validator: ((val: unknown) => boolean) | undefined; __epPropKey: true; }; readonly position: import("element-plus/es/utils").EpPropFinalized; readonly showClose: import("element-plus/es/utils").EpPropFinalized; readonly title: import("element-plus/es/utils").EpPropFinalized; readonly type: import("element-plus/es/utils").EpPropFinalized; readonly zIndex: NumberConstructor; readonly closeIcon: { readonly type: import("vue").PropType (string | Component) & {}) | (() => string | Component) | ((new (...args: any[]) => (string | Component) & {}) | (() => string | Component))[], unknown, unknown>>; readonly required: false; readonly validator: ((val: unknown) => boolean) | undefined; __epPropKey: true; }; }; /** * @deprecated Removed after 3.0.0, Use `NotificationProps` instead. */ export type NotificationPropsPublic = ExtractPublicPropTypes; export declare const notificationEmits: { destroy: () => boolean; }; export type NotificationEmits = typeof notificationEmits; export type NotificationInstance = InstanceType & unknown; export type NotificationOptions = Omit & { /** * @description set the root element for the notification, default to `document.body` */ appendTo?: HTMLElement | string; /** * @description callback function when closed */ onClose?(vm: VNode): void; }; export type NotificationOptionsTyped = Omit; export interface NotificationHandle { close: () => void; } export type NotificationParams = Partial | string | VNode; export type NotificationParamsTyped = Partial | string | VNode; export interface NotifyFn { (options?: NotificationParams, appContext?: null | AppContext): NotificationHandle; closeAll(): void; updateOffsets(position?: NotificationOptions['position']): void; _context: AppContext | null; } export type NotifyTypedFn = (options?: NotificationParamsTyped, appContext?: null | AppContext) => NotificationHandle; export interface Notify extends NotifyFn { primary: NotifyTypedFn; success: NotifyTypedFn; warning: NotifyTypedFn; error: NotifyTypedFn; info: NotifyTypedFn; } export interface NotificationQueueItem { vm: VNode; } export type NotificationQueue = NotificationQueueItem[];