"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/* eslint-disable deprecation/deprecation */
/** @packageDocumentation
 * @module Frontstage
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.FrontstageManager = void 0;
const InternalFrontstageManager_1 = require("./InternalFrontstageManager");
/** Frontstage Manager class.
 * @public
 * @deprecated in 3.7. Use `UiFramework.frontstages` property.
 */
class FrontstageManager {
    /** Initializes the InternalFrontstageManager
     * @deprecated in 3.7. This is called internally.
    */
    static initialize() {
        InternalFrontstageManager_1.InternalFrontstageManager.initialize();
    }
    /** This should only be called within InternalFrontstageManager and its tests.
     *  @internal
     */
    static ensureToolInformationIsSet(toolId) {
        return InternalFrontstageManager_1.InternalFrontstageManager.ensureToolInformationIsSet(toolId);
    }
    /** @internal */
    static get isInitialized() { return InternalFrontstageManager_1.InternalFrontstageManager.isInitialized; }
    static set isInitialized(v) { InternalFrontstageManager_1.InternalFrontstageManager.isInitialized = v; }
    /** Returns true if Frontstage is loading its controls. If false the Frontstage content and controls have been created. */
    static get isLoading() { return InternalFrontstageManager_1.InternalFrontstageManager.isLoading; }
    /** @internal */
    static get nineZoneSize() { return InternalFrontstageManager_1.InternalFrontstageManager.nineZoneSize; }
    static set nineZoneSize(size) {
        InternalFrontstageManager_1.InternalFrontstageManager.nineZoneSize = size;
    }
    /** @internal */
    static get frontstageDefs() {
        return InternalFrontstageManager_1.InternalFrontstageManager.frontstageDefs;
    }
    /** Get Frontstage Deactivated event. */
    static get onFrontstageDeactivatedEvent() { return InternalFrontstageManager_1.InternalFrontstageManager.onFrontstageDeactivatedEvent; }
    /** Get Frontstage Activated event. */
    static get onFrontstageActivatedEvent() { return InternalFrontstageManager_1.InternalFrontstageManager.onFrontstageActivatedEvent; }
    /** Get Frontstage Activated event. */
    static get onFrontstageReadyEvent() { return InternalFrontstageManager_1.InternalFrontstageManager.onFrontstageReadyEvent; }
    /** Get Modal Frontstage Changed event. */
    static get onModalFrontstageChangedEvent() { return InternalFrontstageManager_1.InternalFrontstageManager.onModalFrontstageChangedEvent; }
    /** Get Modal Frontstage Closed event. */
    static get onModalFrontstageClosedEvent() { return InternalFrontstageManager_1.InternalFrontstageManager.onModalFrontstageClosedEvent; }
    /** Get Modal Frontstage Requested Closed event.
       * @alpha
       */
    static get onCloseModalFrontstageRequestedEvent() { return InternalFrontstageManager_1.InternalFrontstageManager.onCloseModalFrontstageRequestedEvent; }
    /** Get Tool Activated event. */
    static get onToolActivatedEvent() { return InternalFrontstageManager_1.InternalFrontstageManager.onToolActivatedEvent; }
    /** Get ToolSetting Reload event. */
    static get onToolSettingsReloadEvent() { return InternalFrontstageManager_1.InternalFrontstageManager.onToolSettingsReloadEvent; }
    /** Get Tool Panel Opened event.
       * @internal
       */
    static get onToolPanelOpenedEvent() { return InternalFrontstageManager_1.InternalFrontstageManager.onToolPanelOpenedEvent; }
    /** Get Tool Icon Changed event. */
    static get onToolIconChangedEvent() { return InternalFrontstageManager_1.InternalFrontstageManager.onToolIconChangedEvent; }
    /** Get Content Layout Activated event. */
    static get onContentLayoutActivatedEvent() { return InternalFrontstageManager_1.InternalFrontstageManager.onContentLayoutActivatedEvent; }
    /** Get Content Control Activated event. */
    static get onContentControlActivatedEvent() { return InternalFrontstageManager_1.InternalFrontstageManager.onContentControlActivatedEvent; }
    /** Get Navigation Aid Activated event. */
    static get onNavigationAidActivatedEvent() { return InternalFrontstageManager_1.InternalFrontstageManager.onNavigationAidActivatedEvent; }
    /** Get Widget State Changed event. */
    static get onWidgetStateChangedEvent() { return InternalFrontstageManager_1.InternalFrontstageManager.onWidgetStateChangedEvent; }
    /** @internal */
    static get onWidgetLabelChangedEvent() { return InternalFrontstageManager_1.InternalFrontstageManager.onWidgetLabelChangedEvent; }
    /** @internal */
    static get onWidgetShowEvent() { return InternalFrontstageManager_1.InternalFrontstageManager.onWidgetShowEvent; }
    /** @internal */
    static get onWidgetExpandEvent() { return InternalFrontstageManager_1.InternalFrontstageManager.onWidgetExpandEvent; }
    /** @internal */
    static get onWidgetDefsUpdatedEvent() { return InternalFrontstageManager_1.InternalFrontstageManager.onWidgetDefsUpdatedEvent; }
    /** @internal */
    static get onFrontstageNineZoneStateChangedEvent() { return InternalFrontstageManager_1.InternalFrontstageManager.onFrontstageNineZoneStateChangedEvent; }
    /** @internal */
    static get onFrontstageRestoreLayoutEvent() { return InternalFrontstageManager_1.InternalFrontstageManager.onFrontstageRestoreLayoutEvent; }
    /** Get Widget State Changed event.
       * @alpha
       */
    static get onPanelStateChangedEvent() { return InternalFrontstageManager_1.InternalFrontstageManager.onPanelStateChangedEvent; }
    /** @internal */
    static get onPanelSizeChangedEvent() { return InternalFrontstageManager_1.InternalFrontstageManager.onPanelSizeChangedEvent; }
    /** Get Nine-zone State Manager.
       * @deprecated in 3.6. Used in UI1.0 only.
       */
    static get NineZoneManager() { return InternalFrontstageManager_1.InternalFrontstageManager.NineZoneManager; }
    /** Clears the Frontstage map.
       */
    static clearFrontstageDefs() {
        return InternalFrontstageManager_1.InternalFrontstageManager.clearFrontstageDefs();
    }
    /** Clears the Frontstage Providers and the defs that may have been created from them.
       */
    static clearFrontstageProviders() {
        return InternalFrontstageManager_1.InternalFrontstageManager.clearFrontstageProviders();
    }
    /** @internal */
    static clearFrontstageDefsForIModelId(iModelId) {
        return InternalFrontstageManager_1.InternalFrontstageManager.clearFrontstageDefsForIModelId(iModelId);
    }
    /** Add a Frontstage via a [[FrontstageProvider]].
       * @param frontstageProvider  FrontstageProvider representing the Frontstage to add
       */
    static addFrontstageProvider(frontstageProvider) {
        return InternalFrontstageManager_1.InternalFrontstageManager.addFrontstageProvider(frontstageProvider);
    }
    /** Find a loaded Frontstage with a given id. If the id is not provided, the active Frontstage is returned. If
       * no cached FrontstageDef is found but a FrontstageProvider is registered a FrontstageDef will be created, cached, and
       * returned.
       * @param id  Id of the Frontstage to find
       * @returns  FrontstageDef with a given id if found, or undefined if not found.
       */
    static async getFrontstageDef(id) {
        return InternalFrontstageManager_1.InternalFrontstageManager.getFrontstageDef(id);
    }
    /** Gets the active FrontstageDef. If a Frontstage is not active, undefined is returned.
       * @return  Active FrontstageDef, or undefined if one is not active.
       */
    static get activeFrontstageDef() {
        return InternalFrontstageManager_1.InternalFrontstageManager.activeFrontstageDef;
    }
    /** Gets the Id of the active FrontstageDef. If a Frontstage is not active, blank is returned.
       * @return  Id of the active FrontstageDef, or blank if one is not active.
       */
    static get activeFrontstageId() {
        return InternalFrontstageManager_1.InternalFrontstageManager.activeFrontstageId;
    }
    static hasFrontstage(frontstageId) {
        return InternalFrontstageManager_1.InternalFrontstageManager.hasFrontstage(frontstageId);
    }
    /** Sets the active FrontstageDef give the stageId.
       * @param  frontstageId  Id of the Frontstage to set active.
       * @returns A Promise that is fulfilled when the [[Frontstage]] is ready.
       */
    static async setActiveFrontstage(frontstageId) {
        return InternalFrontstageManager_1.InternalFrontstageManager.setActiveFrontstage(frontstageId);
    }
    /** Sets the active FrontstageDef.
       * @param  frontstageDef  FrontstageDef to set active.
       * @returns A Promise that is fulfilled when the [[FrontstageDef]] is ready.
       */
    static async setActiveFrontstageDef(frontstageDef) {
        return InternalFrontstageManager_1.InternalFrontstageManager.setActiveFrontstageDef(frontstageDef);
    }
    /** Deactivates the active FrontstageDef.
       */
    static async deactivateFrontstageDef() {
        return InternalFrontstageManager_1.InternalFrontstageManager.deactivateFrontstageDef();
    }
    /** Gets the Id of the active tool. If a tool is not active, blank is returned.
       * @return  Id of the active tool, or blank if one is not active.
       */
    static get activeToolId() {
        return InternalFrontstageManager_1.InternalFrontstageManager.activeToolId;
    }
    /** Sets the active tool id */
    static setActiveToolId(toolId) {
        return InternalFrontstageManager_1.InternalFrontstageManager.setActiveToolId(toolId);
    }
    /** Sets the active tool */
    static setActiveTool(tool) {
        return InternalFrontstageManager_1.InternalFrontstageManager.setActiveTool(tool);
    }
    /** Gets the active tool's [[ToolInformation]] */
    static get activeToolInformation() {
        return InternalFrontstageManager_1.InternalFrontstageManager.activeToolInformation;
    }
    /** Gets the Tool Setting React node of the active tool.
       * @return  Tool Setting React node of the active tool, or undefined if there is no active tool or Tool Settings for the active tool.
       * @internal
       */
    static get activeToolSettingsProvider() {
        return InternalFrontstageManager_1.InternalFrontstageManager.activeToolSettingsProvider;
    }
    /** Sets the active layout, content group and active content.
       * @param contentLayoutDef  Content layout to make active
       * @param contentGroup  Content Group to make active
       */
    static async setActiveLayout(contentLayoutDef, contentGroup) {
        return InternalFrontstageManager_1.InternalFrontstageManager.setActiveLayout(contentLayoutDef, contentGroup);
    }
    /** Sets the active layout, content group and active content.
       * @param contentGroup  Content Group to make active
       */
    static async setActiveContentGroup(contentGroup) {
        return InternalFrontstageManager_1.InternalFrontstageManager.setActiveContentGroup(contentGroup);
    }
    /** Opens a modal Frontstage. Modal Frontstages can be stacked.
       * @param modalFrontstage  Information about the modal Frontstage
       */
    static openModalFrontstage(modalFrontstage) {
        return InternalFrontstageManager_1.InternalFrontstageManager.openModalFrontstage(modalFrontstage);
    }
    /** Closes the top-most modal Frontstage.
       */
    static closeModalFrontstage() {
        return InternalFrontstageManager_1.InternalFrontstageManager.closeModalFrontstage();
    }
    /** Updates the top-most modal Frontstage.
       */
    static updateModalFrontstage() {
        return InternalFrontstageManager_1.InternalFrontstageManager.updateModalFrontstage();
    }
    /** Gets the top-most modal Frontstage.
       * @returns Top-most modal Frontstage, or undefined if there is none.
       */
    static get activeModalFrontstage() {
        return InternalFrontstageManager_1.InternalFrontstageManager.activeModalFrontstage;
    }
    /** Gets the number of modal Frontstages.
       * @returns Modal Frontstage count
       */
    static get modalFrontstageCount() {
        return InternalFrontstageManager_1.InternalFrontstageManager.modalFrontstageCount;
    }
    /** Sets the active Navigation Aid via its Id.
       * @param navigationAidId  Id of the Navigation Aid to set as active
       * @param iModelConnection IModelConnection to query for view data
       */
    static setActiveNavigationAid(navigationAidId, iModelConnection) {
        return InternalFrontstageManager_1.InternalFrontstageManager.setActiveNavigationAid(navigationAidId, iModelConnection);
    }
    /** Sets the state of the widget with the given id
       * @param widgetId  Id of the Widget for which to set the state
       * @param state     New state of the widget
       * @returns true if the widget state was set successfully, or false if not.
       */
    static setWidgetState(widgetId, state) {
        return InternalFrontstageManager_1.InternalFrontstageManager.setWidgetState(widgetId, state);
    }
    /** Finds a widget with the given id in the active frontstage
       * @param widgetId  Id of the Widget to find
       * @returns The WidgetDef with the given id, or undefined if not found.
       */
    static findWidget(widgetId) {
        return InternalFrontstageManager_1.InternalFrontstageManager.findWidget(widgetId);
    }
    /** Opens a nested Frontstage. Nested Frontstages can be stacked.
       * @param nestedFrontstage  Information about the nested Frontstage
       */
    static async openNestedFrontstage(nestedFrontstage) {
        return InternalFrontstageManager_1.InternalFrontstageManager.openNestedFrontstage(nestedFrontstage);
    }
    /** Closes the top-most nested Frontstage.
       */
    static async closeNestedFrontstage() {
        return InternalFrontstageManager_1.InternalFrontstageManager.closeNestedFrontstage();
    }
    /** Gets the top-most nested Frontstage.
       * @returns Top-most nested Frontstage, or undefined if there is none.
       */
    static get activeNestedFrontstage() {
        return InternalFrontstageManager_1.InternalFrontstageManager.activeNestedFrontstage;
    }
    /** Gets the number of nested Frontstages.
       * @returns Nested Frontstage count
       */
    static get nestedFrontstageCount() {
        return InternalFrontstageManager_1.InternalFrontstageManager.nestedFrontstageCount;
    }
}
exports.FrontstageManager = FrontstageManager;
//# sourceMappingURL=FrontstageManager.js.map