import { KLogger } from '@kustomer/apps-common'; import { KAppModalOptions } from './options.js'; import { Subscriptions } from './events.js'; import './context.js'; declare class KAppModal { readonly cardId: string; readonly origin: string; readonly log: KLogger; readonly options: KAppModalOptions; private readonly _subscriptions; private readonly _onDestroy; private readonly _onDestroyAll; /** * the modals instance id */ readonly id: string; /** * whether or not the modal has been initialized */ get initialized(): boolean; private _initialized; /** * whether or not the modal is visible */ get visible(): boolean; private _visible; /** * do not use this class directly, instead * use `kapp.modal(...)` * @private * @param cardId parent `kapp.id` * @param origin kustomer `origin` url * @param log app logger instance * @param options modal options * @param _subscriptions event subscriptions * @param _onDestroy destroy callback * @param _onDestroyAll destroy all callback */ constructor(cardId: string, origin: string, log: KLogger, options: KAppModalOptions, _subscriptions: Subscriptions, _onDestroy: () => void, _onDestroyAll: () => void); /** * create and initialize a new modal instance */ create(): Promise; /** * destroy the modal instance */ destroy(): void; /** * destroy all modal instances */ destroyAll(): void; /** * show the modal */ show(): void; /** * hide the modal */ hide(): void; /** * resize the modal */ resize(args?: { height?: number; width?: number; }): void; /** * publish an event to the parent window * @param type unique event key * @param data event payload */ private _publish; } export { KAppModal };