/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
 * @module Dialog
 */
import { DialogManagerBase } from "./DialogManagerBase";
import { ModalDialogChangedEvent } from "../framework/FrameworkDialogs";
/** Modal Dialog Manager class displays and manages multiple modal dialogs
 * @internal
 */
export class InternalModalDialogManager {
    /** Get the array of modal dialogs */
    static get dialogs() { return InternalModalDialogManager.dialogManager.dialogs; }
    /** Open a modal dialog
     * @param dialog The Dialog to open
     * @param id The id of the Dialog. If one is not provided, an id is generated.
     * @param parentDocument The Document used to determine the owning window.
     */
    static open(dialog, id, parentDocument = document) {
        InternalModalDialogManager.dialogManager.openDialog(dialog, id, parentDocument);
    }
    /** Close a modal dialog
     * @param dialog The Dialog to open. If one is not specified, the active dialog will be closed.
     */
    static close(dialog) {
        InternalModalDialogManager.dialogManager.closeDialog(dialog);
    }
    /** @internal */
    static closeAll() {
        InternalModalDialogManager.dialogManager.closeAll();
    }
    /** Update the dialogs */
    static update() {
        InternalModalDialogManager.dialogManager.update();
    }
    /** Get the active modal dialog */
    static get active() {
        return InternalModalDialogManager.dialogManager.activeDialog;
    }
    /** Get the count of modal dialogs */
    static get count() {
        return InternalModalDialogManager.dialogManager.dialogCount;
    }
}
/** Modal Dialog Changed Event */
InternalModalDialogManager.onModalDialogChangedEvent = new ModalDialogChangedEvent();
/** @internal */
InternalModalDialogManager.dialogManager = new DialogManagerBase(InternalModalDialogManager.onModalDialogChangedEvent);
//# sourceMappingURL=InternalModalDialogManager.js.map