"use strict";
/*---------------------------------------------------------------------------------------------
* 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
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.ContentDialogRenderer = exports.ContentDialogManager = void 0;
const React = require("react");
const DialogManagerBase_1 = require("./DialogManagerBase");
const InternalContentDialogManager_1 = require("./InternalContentDialogManager");
// cSpell:ignore ZINDEX modeless
/** Content Dialog Manager class displays and manages multiple modeless dialogs
 * @public
 * @deprecated in 3.7. Use `UiFramework.content.dialog` property.
 */
class ContentDialogManager {
    /** Initialize the modeless dialog manager.
     * @deprecated in 3.7. This is called internally.
    */
    static initialize() {
        return InternalContentDialogManager_1.InternalContentDialogManager.initialize();
    }
    /** Content Dialog Changed Event */
    static get onContentDialogChangedEvent() { return InternalContentDialogManager_1.InternalContentDialogManager.onContentDialogChangedEvent; }
    /** @internal */
    static get dialogManager() { return InternalContentDialogManager_1.InternalContentDialogManager.dialogManager; }
    /** Get the array of modeless dialogs */
    static get dialogs() { return InternalContentDialogManager_1.InternalContentDialogManager.dialogs; }
    /** Open a modeless dialog
     * @param dialog The Dialog to open
     * @param id The id of the Dialog to open
     */
    static openDialog(dialog, id, parentDocument = document) {
        return InternalContentDialogManager_1.InternalContentDialogManager.open(dialog, id, parentDocument);
    }
    /** Close a modeless dialog
     * @param id The id of the Dialog to close.
     */
    static closeDialog(id) {
        return InternalContentDialogManager_1.InternalContentDialogManager.close(id);
    }
    /** @internal */
    static closeAll() {
        return InternalContentDialogManager_1.InternalContentDialogManager.closeAll();
    }
    /** Update the dialogs */
    static update() {
        return InternalContentDialogManager_1.InternalContentDialogManager.update();
    }
    /** Get the active modeless dialog */
    static get activeDialog() {
        return InternalContentDialogManager_1.InternalContentDialogManager.active;
    }
    /** Get the count of modeless dialogs */
    static get dialogCount() {
        return InternalContentDialogManager_1.InternalContentDialogManager.count;
    }
    /** Handle a pointer down event on a modeless dialog */
    static handlePointerDownEvent(_event, id, updateFunc) {
        return InternalContentDialogManager_1.InternalContentDialogManager.handlePointerDownEvent(_event, id, updateFunc);
    }
    /** Get the z-index for a modeless dialog */
    static getDialogZIndex(id) {
        return InternalContentDialogManager_1.InternalContentDialogManager.getZIndex(id);
    }
    static getDialogInfo(id) {
        return InternalContentDialogManager_1.InternalContentDialogManager.getInfo(id);
    }
}
exports.ContentDialogManager = ContentDialogManager;
/** ContentDialogRenderer React component renders modeless dialogs.
 * @public
 */
class ContentDialogRenderer extends React.PureComponent {
    constructor(props) {
        super(props);
    }
    render() {
        return (React.createElement(DialogManagerBase_1.DialogRendererBase, { ...this.props, dialogManager: InternalContentDialogManager_1.InternalContentDialogManager.dialogManager }));
    }
}
exports.ContentDialogRenderer = ContentDialogRenderer;
//# sourceMappingURL=ContentDialogManager.js.map