/*---------------------------------------------------------------------------------------------
* 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 * as React from "react";
import { DialogRendererBase } from "./DialogManagerBase";
import { InternalModalDialogManager as internal } from "./InternalModalDialogManager";
/** ModalDialogRenderer React component renders modal dialogs
 * @public
 */
export class ModalDialogRenderer extends React.PureComponent {
    constructor(props) {
        super(props);
    }
    render() {
        return (React.createElement(DialogRendererBase, { ...this.props, dialogManager: internal.dialogManager }));
    }
}
/** Modal Dialog Manager class displays and manages multiple modal dialogs
 * @public
 * @deprecated in 3.7. Use `UiFramework.dialogs.modal` property.
 */
export class ModalDialogManager {
    /** Modal Dialog Changed Event */
    static get onModalDialogChangedEvent() { return internal.onModalDialogChangedEvent; }
    /** @internal */
    static get dialogManager() { return internal.dialogManager; }
    /** Get the array of modal dialogs */
    static get dialogs() { return internal.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 openDialog(dialog, id, parentDocument = document) {
        internal.open(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 closeDialog(dialog) {
        internal.close(dialog);
    }
    /** @internal */
    static closeAll() {
        internal.closeAll();
    }
    /** Update the dialogs */
    static update() {
        internal.update();
    }
    /** Get the active modal dialog */
    static get activeDialog() {
        return internal.active;
    }
    /** Get the count of modal dialogs */
    static get dialogCount() {
        return internal.count;
    }
}
//# sourceMappingURL=ModalDialogManager.js.map