import { LitElement, type CSSResultGroup, type PropertyValues, type TemplateResult } from "lit"; import { HideEvent, ShowEvent } from "./events.ts"; interface TapsiModalEventMap extends HTMLElementEventMap { [HideEvent.type]: HideEvent; [ShowEvent.type]: ShowEvent; } /** * @summary Display a modal dialog box, providing a title, content area, and action buttons. * * @tag tapsi-modal * * @slot [image] - The slot for imagery element. * @slot [action-bar] - The slot for actionbar element. * * @fires {ShowEvent} show - Fires when the modal should be visible. (cancelable) * @fires {HideEvent} hide - Fires when the modal should be hidden. (cancelable) */ export declare class Modal extends LitElement { /** @internal */ static readonly styles: CSSResultGroup; /** @internal */ static readonly shadowRootOptions: { delegatesFocus: boolean; mode: ShadowRootMode; serializable?: boolean; slotAssignment?: SlotAssignmentMode; }; /** @internal */ addEventListener: (type: K, listener: (this: Modal, ev: TapsiModalEventMap[K]) => void, options?: boolean | AddEventListenerOptions) => void; /** @internal */ removeEventListener: (type: K, listener: (this: Modal, ev: TapsiModalEventMap[K]) => void, options?: boolean | EventListenerOptions) => void; /** * Sets the title of the modal. * * @prop {string} heading * @attr {string} heading * @default "" */ heading: string; /** * Sets the description text for the modal. * * @prop {string} description * @attr {string} description * @default "" */ description: string; /** * Determines the alignment of the modal's content. * * @prop {"start" | "center"} alignment * @attr {"start" | "center"} alignment * @default "start" */ alignment: "start" | "center"; private _hasImageSlot; private _imageSlotNodes; private _root; private _container; private _open; private readonly _focusTrapper; private readonly _scrollLocker; private readonly _animationController; private _previouslyFocusedElement; private _init; constructor(); /** * Determines whether the modal is open or not. * * @default false */ set open(openState: boolean); get open(): boolean; private _toggleOpenState; private _attachGlobalEvents; private _detachGlobalEvents; /** @internal */ connectedCallback(): void; /** @internal */ disconnectedCallback(): void; protected updated(changed: PropertyValues): void; protected willUpdate(changed: PropertyValues): void; private _handleImageSlotChange; /** * Show the modal. */ show(): void; /** * Hide the modal. */ hide(): void; private _lockScroll; private _unlockScroll; private _handleOverlayClick; private _handleDocumentKeyDown; private _renderContainer; protected render(): TemplateResult; } export {};