"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 Frontstage
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.FrontstageUtilities = void 0;
const React = require("react");
const ContentGroup_1 = require("../content/ContentGroup");
const ContentToolWidgetComposer_1 = require("../widgets/ContentToolWidgetComposer");
const ViewToolWidgetComposer_1 = require("../widgets/ViewToolWidgetComposer");
const StatusBarComposer_1 = require("../statusbar/StatusBarComposer");
const StagePanelState_1 = require("../stagepanels/StagePanelState");
/** Helper namespace to create frontstages.
 * @beta
 */
var FrontstageUtilities;
(function (FrontstageUtilities) {
    /** Creates an empty frontstage. All toolbar buttons, widgets and other UI items must be provided by {@link UiItemsProvider}. */
    function createStandardFrontstage(props) {
        const contentGroup = props.contentGroupProps instanceof ContentGroup_1.ContentGroupProvider
            ? props.contentGroupProps
            : new ContentGroup_1.ContentGroup(props.contentGroupProps);
        return {
            id: props.id,
            version: props.version ?? 1.0,
            contentGroup,
            usage: props.usage,
            defaultTool: props.defaultTool,
            contentManipulation: {
                id: `${props.id}-contentManipulationTools`,
                content: (React.createElement(ContentToolWidgetComposer_1.ContentToolWidgetComposer, { cornerButton: props.cornerButton })),
            },
            viewNavigation: {
                id: `${props.id}-viewNavigationTools`,
                content: (React.createElement(ViewToolWidgetComposer_1.ViewToolWidgetComposer, { hideNavigationAid: props.hideNavigationAid })),
            },
            toolSettings: props.hideToolSettings
                ? undefined
                : {
                    id: `${props.id}-toolSettings`,
                },
            statusBar: props.hideStatusBar
                ? undefined
                : {
                    id: `${props.id}-statusBar`,
                    content: React.createElement(StatusBarComposer_1.StatusBarComposer, { items: [] }),
                },
            leftPanel: {
                sizeSpec: 300,
                pinned: false,
                defaultState: StagePanelState_1.StagePanelState.Minimized,
                ...props.leftPanelProps,
            },
            topPanel: {
                sizeSpec: 90,
                pinned: false,
                defaultState: StagePanelState_1.StagePanelState.Minimized,
                ...props.topPanelProps,
            },
            rightPanel: {
                defaultState: StagePanelState_1.StagePanelState.Open,
                ...props.rightPanelProps,
            },
            bottomPanel: {
                sizeSpec: 180,
                defaultState: StagePanelState_1.StagePanelState.Open,
                ...props.bottomPanelProps,
            },
        };
    }
    FrontstageUtilities.createStandardFrontstage = createStandardFrontstage;
})(FrontstageUtilities || (exports.FrontstageUtilities = FrontstageUtilities = {}));
//# sourceMappingURL=FrontstageUtilities.js.map