import type { Component } from 'vue' export class Popup

{ component?: Component payload?: P config?: PopupConfig public static component

(component: Component): Popup

{ const popup = new Popup

() popup.component = component return popup } public setPayload(payload: P) { this.payload = payload return this } public setConfig(config: PopupConfig) { this.config = config return this } } export interface PopupConfig { heading: string size: PopupSize closeOnOverlayClick?: boolean callback?: (payload?: unknown) => void } export enum PopupSize { SMALL = 'small', MEDIUM = 'medium', LARGE = 'large', FULL = 'full', }