/**
 * Copyright IBM Corp. 2019, 2026
 *
 * This source code is licensed under the Apache-2.0 license found in the
 * LICENSE file in the root directory of this source tree.
 */
import { LitElement } from 'lit';
import { MODAL_SIZE } from './defs';
import '../inline-loading';
export { MODAL_SIZE };
declare const CDSModal_base: {
    new (...args: any[]): {
        _handles: Set<import("../../globals/internal/handle").default>;
        connectedCallback(): void;
        disconnectedCallback(): void;
    };
    _hostListeners: {
        [listenerName: string]: {
            [type: string]: {
                options?: boolean | AddEventListenerOptions;
            };
        };
    };
} & typeof LitElement;
/**
 * Modal.
 *
 * @element cds-custom-modal
 * @csspart dialog The dialog.
 * @fires cds-custom-modal-beingclosed
 *   The custom event fired before this modal is being closed upon a user gesture.
 *   Cancellation of this event stops the user-initiated action of closing this modal.
 * @fires cds-custom-modal-closed - The custom event fired after this modal is closed upon a user gesture.
 */
declare class CDSModal extends CDSModal_base {
    /**
     * The element that had focus before this modal gets open.
     */
    protected _launcher: Element | null;
    /**
     * The inline loading element that renders when `loading-status` is not `inactive`
     */
    private _loadingEl;
    /**
     * MutationObserver that observes the modal-footer
     */
    private _footerObserver?;
    /**
     * MutationObserver that observes the modal-header
     */
    private _headerObserver?;
    /**
     * Loading statuses that are not `inactive`
     */
    private WORKING_LOADING_STATUSES;
    /**
     * Handles `click` event on this element.
     *
     * @param event The event.
     */
    protected _handleClick: (event: MouseEvent) => void;
    /**
     * Handle the keydown event.
     * Trap the focus inside the side-panel by tracking keydown.key == `Tab`
     *
     * @param {KeyboardEvent} event The keyboard event object.
     */
    protected _handleHostKeydown: (event: KeyboardEvent) => void;
    protected _handleKeydown: ({ key, target }: KeyboardEvent) => void;
    /**
     * Get focusable elements.
     *
     * Querying all tabbable items.
     *
     * @returns {{first: HTMLElement, last: HTMLElement, all: HTMLElement[]}} Returns an object with various elements.
     */
    protected getFocusable(): {
        first: HTMLElement | undefined;
        last: HTMLElement | undefined;
        all: HTMLElement[];
    };
    /**
     * Handles `click` event on the modal container.
     *
     * @param event The event.
     */
    protected _handleClickContainer(event: MouseEvent): void;
    /**
     * Handles user-initiated close request of this modal.
     *
     * @param triggeredBy The element that triggered this close request.
     */
    protected _handleUserInitiatedClose(triggeredBy: EventTarget | null): void;
    /**
     * Handles `slotchange` event.
     */
    protected _handleSlotChange(): void;
    /**
     * Specify whether the Modal is displaying an alert, error or warning.
     * Should go hand in hand with the danger prop.
     */
    alert: boolean;
    /**
     * Specify text for the accessibility label of the header
     */
    ariaLabel: string | null;
    /**
     * The additional CSS class names for the container <div> of the element.
     */
    containerClass: string;
    /**
     * Specify whether or not the Modal content should have any inner padding.
     */
    fullWidth: boolean;
    /**
     * Specify whether the modal contains scrolling content
     */
    hasScrollingContent: boolean;
    /**
     * `true` if the modal should be open.
     */
    open: boolean;
    /**
     * Modal size.
     */
    size: MODAL_SIZE;
    /**
     * Prevent closing on click outside of modal
     */
    preventCloseOnClickOutside: boolean;
    /**
     * Specify the loading status
     */
    loadingStatus: 'inactive' | 'active' | 'finished' | 'error';
    /**
     * Specify the description for the loading text
     */
    loadingDescription: string;
    /**
     * Provide a delay for the setTimeout for success
     */
    loadingSuccessDelay: number;
    /**
     * Specify the description for the loading icon
     */
    loadingIconDescription: string;
    /**
     * Specify if Enter key should be used as "submit" action that clicks the primary footer button
     */
    shouldSubmitOnEnter: boolean;
    /**
     * Prevent the modal from closing after clicking the close button
     */
    preventClose: boolean;
    private _initializeLoadingEl;
    protected _getFooterElements(): {
        footer: Element | null;
        primaryButton: HTMLElement | null;
        secondaryButtons: HTMLElement[];
    };
    private _updateLoadingElement;
    firstUpdated(): Promise<void>;
    /**
     * Computes the aria-label of the modal based on (in order of highest to lowest precedence):
     * - `modal-label`
     * - `aria-label`
     * - `modal-heading`
     */
    private _computeAriaLabel;
    /**
     * Observes the modal footer's `has-three-buttons` attribute to account for cases
     * where the loading status and the amount of footer-buttons
     * are being changed dynamically
     */
    private _observeFooter;
    /**
     * Observes the modal header to account for cases where the modal-heading,
     * modal-label, and/or `aria-label` are dynamically changing
     * to update the `aria-label` put on the modal
     */
    private _observeHeader;
    connectedCallback(): void;
    disconnectedCallback(): void;
    render(): import("lit-html").TemplateResult<1>;
    updated(changedProperties: any): Promise<void>;
    /**
     * @param ms The number of milliseconds.
     * @returns A promise that is resolves after the given milliseconds.
     */
    protected static _delay(ms?: number): Promise<unknown>;
    /**
     * A selector selecting buttons that should close this modal.
     */
    static get selectorCloseButton(): string;
    /**
     * A selector selecting tabbable nodes.
     */
    static get selectorTabbable(): string;
    /**
     * A selector selecting the nodes that should be focused when modal gets open.
     */
    static get selectorPrimaryFocus(): string;
    /**
     * A selector selecting the modal body component
     */
    static get selectorModalBody(): string;
    /**
     * The name of the custom event fired before this modal is being closed upon a user gesture.
     * Cancellation of this event stops the user-initiated action of closing this modal.
     */
    static get eventBeforeClose(): string;
    /**
     * The name of the custom event fired after this modal is closed upon a user gesture.
     */
    static get eventClose(): string;
    /**
     * The name of the custom event fired when this modal reaches a `finished` loading state
     */
    static get eventOnLoadingSuccess(): string;
    static styles: any;
}
export default CDSModal;
//# sourceMappingURL=modal.d.ts.map