"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 ContentView
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.ContentLayoutManager = void 0;
const InternalContentLayoutManager_1 = require("./InternalContentLayoutManager");
/** ContentLayout Manager class.
 * @public
 * @deprecated in 3.7. Use `UiFramework.content.layouts` property.
 */
class ContentLayoutManager {
    /** build a layout key that is unique for group layout combination */
    static getLayoutKey(props) {
        return InternalContentLayoutManager_1.InternalContentLayoutManager.getKey(props);
    }
    /** Return a LayoutDef that is specific to a content group.
     * @returns the [[ContentLayoutDef]] if found, or undefined otherwise
     */
    static getLayoutForGroup(contentGroupProps, overrideContentLayout) {
        return InternalContentLayoutManager_1.InternalContentLayoutManager.getForGroup(contentGroupProps, overrideContentLayout);
    }
    /** Finds a Content Layout with a given id.
     * @param layoutKey  group specific layout id, see `getLayoutKey`
     * @returns the [[ContentLayoutDef]] if found, or undefined otherwise
     */
    static findLayout(layoutKey) {
        return InternalContentLayoutManager_1.InternalContentLayoutManager.find(layoutKey);
    }
    /** Adds a Content Layout.
     * @param layoutId  the id of the Content Layout to add
     * @param layoutDef  the Content Layout definition to add
     */
    static addLayout(layoutId, layoutDef) {
        return InternalContentLayoutManager_1.InternalContentLayoutManager.add(layoutId, layoutDef);
    }
    /** Gets the active Content Layout */
    static get activeLayout() {
        return InternalContentLayoutManager_1.InternalContentLayoutManager.activeLayout;
    }
    /** Gets the active Content Group */
    static get activeContentGroup() {
        return InternalContentLayoutManager_1.InternalContentLayoutManager.activeContentGroup;
    }
    /** Sets the active Content Layout, Content Group and Content Control.
     * @param contentLayoutDef  Content layout to make active
     * @param contentGroup  Content Group to make active
     */
    static async setActiveLayout(contentLayoutDef, contentGroup) {
        return InternalContentLayoutManager_1.InternalContentLayoutManager.setActive(contentLayoutDef, contentGroup);
    }
    /** Sets the active Content Group.
     * @param contentGroup  Content Group to make active
     */
    static async setActiveContentGroup(contentGroup) {
        return InternalContentLayoutManager_1.InternalContentLayoutManager.setActiveContentGroup(contentGroup);
    }
    /** Refreshes the active layout and content group.
     */
    static refreshActiveLayout() {
        return InternalContentLayoutManager_1.InternalContentLayoutManager.refreshActive();
    }
}
exports.ContentLayoutManager = ContentLayoutManager;
//# sourceMappingURL=ContentLayoutManager.js.map