import { VNode, CSSProperties } from 'vue'; import { ButtonProps } from '../button'; import { ScrollbarProps } from '../scrollbar'; import { MountElement } from '../utils'; export type ContentType = string | VNode | (() => VNode); export type ModalCallback = () => unknown | Promise; export interface Props { width?: string | number; height?: string | number; icon?: VNode | (() => VNode); title?: ContentType; titleClass?: string; titleStyle?: CSSProperties; content?: ContentType; contentClass?: string; contentStyle?: CSSProperties; scrollbarProps?: ScrollbarProps; bodyClass?: string; bodyStyle?: CSSProperties; cancelText?: string; cancelProps?: ButtonProps; okText?: string; okType?: 'default' | 'reverse' | 'primary' | 'danger' | 'dashed' | 'text' | 'link'; okProps?: ButtonProps; noticeText?: string; noticeProps?: ButtonProps; footer?: boolean | (() => VNode); closable?: boolean; closeIcon?: VNode | (() => VNode); closeFocusable?: boolean; renderBeforeOpen?: boolean; destroyOnClose?: boolean; centered?: boolean; top?: string | number; transformOrigin?: 'mouse' | 'center'; confirmLoading?: boolean; blockScroll?: boolean; keyboard?: boolean; mask?: boolean; maskClosable?: boolean; maskClass?: string; maskStyle?: CSSProperties; wrapClass?: string; wrapStyle?: CSSProperties; containerClass?: string; containerStyle?: CSSProperties; zIndex?: number; autoFocusButton?: 'ok' | 'cancel'; focusTriggerAfterClose?: boolean; modalRender?: (arg: { originVNode: VNode; }) => VNode; afterClose?: () => void; onEsc?: (e: KeyboardEvent) => void; onMaskClick?: (e: MouseEvent) => void; to?: string | MountElement; open?: boolean; } export interface ModalSlots { icon?: () => VNode[]; title?: () => VNode[]; default?: () => VNode[]; footer?: () => VNode[]; closeIcon?: () => VNode[]; modalRender?: (arg: { originVNode: VNode; }) => VNode[]; } export interface ModalOptions { width?: string | number; height?: string | number; icon?: VNode | (() => VNode); title?: ContentType; titleClass?: string; titleStyle?: CSSProperties; content?: ContentType; contentClass?: string; contentStyle?: CSSProperties; scrollbarProps?: ScrollbarProps; bodyClass?: string; bodyStyle?: CSSProperties; showCancel?: boolean; cancelText?: string; cancelProps?: ButtonProps; okText?: string; okType?: 'default' | 'reverse' | 'primary' | 'danger' | 'dashed' | 'text' | 'link'; okProps?: ButtonProps; noticeText?: string; noticeProps?: ButtonProps; footer?: boolean | (() => VNode); closable?: boolean; closeIcon?: VNode | (() => VNode); closeFocusable?: boolean; destroyOnClose?: boolean; centered?: boolean; top?: string | number; transformOrigin?: 'mouse' | 'center'; blockScroll?: boolean; keyboard?: boolean; mask?: boolean; maskClosable?: boolean; maskClass?: string; maskStyle?: CSSProperties; wrapClass?: string; wrapStyle?: CSSProperties; containerClass?: string; containerStyle?: CSSProperties; zIndex?: number; autoFocusButton?: 'ok' | 'cancel'; focusTriggerAfterClose?: boolean; modalRender?: (arg: { originVNode: VNode; }) => VNode; afterClose?: () => void; onKnow?: ModalCallback; onOk?: ModalCallback; onCancel?: ModalCallback; onEsc?: (e: KeyboardEvent) => void; onMaskClick?: (e: MouseEvent) => void; } export interface ModalUpdate extends ModalOptions { mode?: Mode; loading?: boolean; } export interface ModalReactive extends ModalOptions { readonly key: string; destroy: () => void; update: (options: ModalUpdate) => void; show: () => void; } export type Mode = 'info' | 'success' | 'error' | 'warning' | 'confirm' | 'erase' | 'custom'; declare const _default: __VLS_WithTemplateSlots void; change: (...args: any[]) => void; "update:open": (...args: any[]) => void; ok: (...args: any[]) => void; ready: (...args: any[]) => void; know: (...args: any[]) => void; }, string, import('vue').PublicProps, Readonly & Readonly<{ onCancel?: ((...args: any[]) => any) | undefined; onChange?: ((...args: any[]) => any) | undefined; "onUpdate:open"?: ((...args: any[]) => any) | undefined; onOk?: ((...args: any[]) => any) | undefined; onReady?: ((...args: any[]) => any) | undefined; onKnow?: ((...args: any[]) => any) | undefined; }>, { footer: boolean | (() => VNode); title: ContentType; mask: boolean; top: string | number; width: string | number; height: string | number; closable: boolean; icon: VNode | (() => VNode); afterClose: () => void; to: string | MountElement; zIndex: number; transformOrigin: "mouse" | "center"; content: ContentType; open: boolean; contentClass: string; contentStyle: CSSProperties; keyboard: boolean; scrollbarProps: ScrollbarProps; bodyStyle: CSSProperties; titleStyle: CSSProperties; titleClass: string; bodyClass: string; cancelText: string; cancelProps: ButtonProps; okText: string; okType: "default" | "reverse" | "primary" | "danger" | "dashed" | "text" | "link"; okProps: ButtonProps; closeIcon: VNode | (() => VNode); closeFocusable: boolean; renderBeforeOpen: boolean; destroyOnClose: boolean; centered: boolean; confirmLoading: boolean; blockScroll: boolean; maskClosable: boolean; maskClass: string; maskStyle: CSSProperties; wrapClass: string; wrapStyle: CSSProperties; containerClass: string; containerStyle: CSSProperties; focusTriggerAfterClose: boolean; autoFocusButton: "ok" | "cancel"; onEsc: (e: KeyboardEvent) => void; onMaskClick: (e: MouseEvent) => void; noticeText: string; noticeProps: ButtonProps; modalRender: (arg: { originVNode: VNode; }) => VNode; }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, { modalWrapRef: HTMLDivElement; }, any>, Readonly & ModalSlots>; export default _default; type __VLS_WithTemplateSlots = T & { new (): { $slots: S; }; };