"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 ConfigurableUi
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConfigurableUiManager = void 0;
const UiFramework_1 = require("../UiFramework");
const Task_1 = require("../workflow/Task");
const Workflow_1 = require("../workflow/Workflow");
const InternalConfigurableUiManager_1 = require("./InternalConfigurableUiManager");
/** Configurable Ui Manager maintains controls, Frontstages, Content Groups, Content Layouts, Tasks and Workflows.
 * @public
 * @deprecated in 3.7. Use `UiFramework.controls` property.
 */
class ConfigurableUiManager {
    /** Initializes the InternalConfigurableUiManager and registers core controls.
     * @deprecated in 3.7. This is called internally.
    */
    static initialize() {
        return InternalConfigurableUiManager_1.InternalConfigurableUiManager.initialize();
    }
    /** Registers a control implementing the [[ConfigurableUiElement]] interface.
     * These controls can be a
     * [[ContentControl]],
     * [[NavigationAidControl]],
     * [[StatusBarWidgetControl]],
     * [[WidgetControl]] or
     * [[ToolUiProvider]].
     * @param classId the class id of the control to register
     * @param constructor the constructor of the control to register
     * @deprecated in 3.7. Use `register` method.
     */
    static registerControl(classId, constructor) {
        return InternalConfigurableUiManager_1.InternalConfigurableUiManager.register(classId, constructor);
    }
    /** Determines if a control has been registered based on its classId.
     * @param classId   the class id of the control to test
     * @returns  true if the control is registered or false if not
     */
    static isControlRegistered(classId) {
        return InternalConfigurableUiManager_1.InternalConfigurableUiManager.isRegistered(classId);
    }
    /** Determines if a control has been registered.
     * @internal
     */
    static getConstructorClassId(constructor) {
        return InternalConfigurableUiManager_1.InternalConfigurableUiManager.getConstructorClassId(constructor);
    }
    /** Unregisters a control that has been registered.
     * @param classId   the class id of the control to unregister
     * @deprecated in 3.7. Use `unregister` method.
     */
    static unregisterControl(classId) {
        return InternalConfigurableUiManager_1.InternalConfigurableUiManager.unregister(classId);
    }
    /** Creates a control registered by calling registerControl.
     * @param classId   the class id of the control to create
     * @param uniqueId  a unique id for the control
     * @param options   options passed to the constructor of the control
     * @param controlId controlId which may not be unique across all control instances.
     * @returns  the created control
     * @deprecated in 3.7. Use `create` method.
     */
    static createControl(classId, uniqueId, options, controlId) {
        return InternalConfigurableUiManager_1.InternalConfigurableUiManager.create(classId, uniqueId, options, controlId);
    }
    /** Add a Frontstage via a provider into the [[FrontstageManager]].
     * @param frontstageProvider  Provider of the Frontstage to add
     * @deprecated in 3.7. Use `UiFramework.frontstages.addFrontstageProvider` method.
     */
    static addFrontstageProvider(frontstageProvider) {
        UiFramework_1.UiFramework.frontstages.addFrontstageProvider(frontstageProvider);
    }
    /** Loads one or more Tasks into the [[TaskManager]].
     * @param taskPropsList  the list of Tasks to load
     * @internal
     * @deprecated in 3.0. TaskManager is obsolete.
     */
    static loadTasks(taskPropsList) {
        Task_1.TaskManager.loadTasks(taskPropsList); // eslint-disable-line deprecation/deprecation
    }
    /** Loads a Workflow into the [[WorkflowManager]].
     * @param workflowProps  the Workflow to load
     * @internal
     * @deprecated in 3.0. WorkflowManager is obsolete.
     */
    static loadWorkflow(workflowProps) {
        Workflow_1.WorkflowManager.loadWorkflow(workflowProps); // eslint-disable-line deprecation/deprecation
    }
    /** Loads one or more Workflows into the [[WorkflowManager]].
     * @param workflowPropsList  the list of Workflows to load
     * @internal
     * @deprecated in 3.0. WorkflowManager is obsolete.
     */
    static loadWorkflows(workflowPropsList) {
        Workflow_1.WorkflowManager.loadWorkflows(workflowPropsList); // eslint-disable-line deprecation/deprecation
    }
    /** Loads one or more Keyboard Shortcuts into the [[KeyboardShortcutManager]].
     * @param shortcutList  the properties of the Keyboard Shortcuts to load
     * @deprecated in 3.7. Use `UiFramework.keyboardShortcuts.loadShortcuts` method.
     */
    static loadKeyboardShortcuts(shortcutList) {
        UiFramework_1.UiFramework.keyboardShortcuts.loadShortcuts(shortcutList);
    }
    /** Gets the HTML wrapper element for Configurable UI */
    static getWrapperElement() {
        return InternalConfigurableUiManager_1.InternalConfigurableUiManager.getWrapperElement();
    }
    /** Closes all UI popups currently open */
    static closeUi() {
        return InternalConfigurableUiManager_1.InternalConfigurableUiManager.closeUi();
    }
}
exports.ConfigurableUiManager = ConfigurableUiManager;
//# sourceMappingURL=ConfigurableUiManager.js.map