import type { Component, InjectionKey, ShallowUnwrapRef } from 'vue'; export type IDialogItemId = number | string; export type ExtractComponentProps = T extends { new (...args: any): any; } ? InstanceType['$props'] : T extends (props: infer P, ...args: any) => any ? P : any; export type DialogCallback = {} extends P ? (props?: P) => Promise : (props: P) => Promise; export type DialogOnCloseEvent = { id: IDialogItemId; item: IDialogItem; cancel: () => void; }; export interface IDialogItem { component: ShallowUnwrapRef; id: IDialogItemId; props: Record & { modelValue: boolean; }; onClose?: ((event: DialogOnCloseEvent) => void) | undefined; } type DialogAddMethod = (params: { component: T; props?: Omit, 'modelValue'> | undefined; id?: IDialogItemId | undefined; }, hooks?: { onClose?: ((event: DialogOnCloseEvent) => void) | undefined; }) => IDialogItemId; type DialogRemoveMethod = (id: IDialogItemId, closeDelay?: number) => void; interface IDialogMethods { addDialog: DialogAddMethod; removeDialog: DialogRemoveMethod; } export interface IDialog extends IDialogMethods { dialogs: IDialogItem[]; } export type DialogInjectionKey = InjectionKey; export interface DialogPluginOptions { closeDelay?: number; props?: Record; } export {}; //# sourceMappingURL=Plugin.d.ts.map