import type { ModalTypes } from './types'; export * from './types'; export default abstract class Modal { private static _id?; private static readonly emitter; private static _open; protected constructor(); static get id(): string; /** * Constructs the modal elements if it does not exist already * * @param options * @private */ private static constructIfNotExist; /** * Construct the modal elements and add them to the document body * * @param options * @private */ private static construct; /** * Sets the modal dialog options * * @param options * @private */ private static setDialogOptions; /** * Displays the modal using the supplied options * * Note: If body, title, or footer are passed as JQuery<> elements the call is * non-destructive (i.e. the elements will be cloned and the ids changed to avoid * conflicts elsewhere) * * @param options * @private */ private static display; /** * Adds an event listener to the modal * * @param event * @param listener */ static on(event: ModalTypes.Event, listener: (...args: any[]) => void): void; /** * Removes an event listener from the modal * * @param event * @param listener */ static off(event: ModalTypes.Event, listener: (...args: any[]) => void): void; /** * Adds a one-time event listener to the modal * * @param event * @param listener */ static once(event: ModalTypes.Event, listener: (...args: any[]) => void): void; /** * Returns if the modal is open */ static get isOpen(): boolean; /** * Returns the modal element */ static get container(): JQuery; /** * Returns the modal dialog element * * @private */ static get dialog(): JQuery; /** * Returns the modal header element */ static get header(): JQuery; /** * Returns the modal title element */ static get title(): JQuery; /** * Returns the modal close button element */ static get close_button(): JQuery; /** * Returns the modal body element */ static get body(): JQuery; /** * Returns the modal footer element */ static get footer(): JQuery; /** * Allows for selecting an element within the modal itself * * @param selector */ static select(selector: JQuery.Selector): JQuery; /** * Opens the modal using the supplied options * * Note: If body, title, or footer are passed as JQuery<> elements the call is * non-destructive (i.e. the elements will be cloned and the ids changed to avoid * conflicts elsewhere) * * @param options */ static open(options?: Partial>): JQuery; /** * Closes the modal * * Note: can be called even if the modal is not open */ static close(): void; } export { Modal };