import { Component } from 'vue'; import { ColorScheme, OverlayCallbacks, SizeProp } from '../../declaration'; import { VsModalNodeStyleSet } from '../../components/vs-modal/types'; export interface ModalOptions { beforeClose?: () => Promise | boolean; container?: string; colorScheme?: ColorScheme; styleSet?: string | VsModalNodeStyleSet; callbacks?: OverlayCallbacks; dimClose?: boolean; dimmed?: boolean; escClose?: boolean; focusLock?: boolean; hideScroll?: boolean; id?: string; scrollLock?: boolean | string; componentProps?: Record; size?: SizeProp | { width?: SizeProp; height?: SizeProp; }; } export interface ModalInfo extends ModalOptions { container: string; id: string; content: string | Component; } export interface ModalPlugin { open(content: string, options?: Omit): string; open(content: Component, options?: ModalOptions): string; emit(eventName: string, ...args: any[]): void | Promise; emitWithId(id: string, eventName: string, ...args: any[]): void | Promise; close(container?: string): Promise; closeWithId(id: string): Promise; clear(container?: string): void; }