"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.StandardFrontstageProvider = void 0;
const React = require("react");
const StagePanel_1 = require("../stagepanels/StagePanel");
const ContentGroup_1 = require("../content/ContentGroup");
const FrontstageProvider_1 = require("./FrontstageProvider");
const Frontstage_1 = require("./Frontstage");
const CoreToolDefinitions_1 = require("../tools/CoreToolDefinitions");
const Zone_1 = require("../zones/Zone");
const ContentToolWidgetComposer_1 = require("../widgets/ContentToolWidgetComposer");
const Widget_1 = require("../widgets/Widget");
const ViewToolWidgetComposer_1 = require("../widgets/ViewToolWidgetComposer");
const StatusBarWidgetComposerControl_1 = require("../widgets/StatusBarWidgetComposerControl");
const StagePanelDef_1 = require("../stagepanels/StagePanelDef");
/**
 * FrontstageProvider that provides an "empty" stage. All tool buttons, statusbar items, and widgets must
 * be provided by one or more item providers, see [UiItemsProvider]($appui-abstract).
 * @public
 */
class StandardFrontstageProvider extends FrontstageProvider_1.FrontstageProvider {
    constructor(props) {
        super();
        this.props = props;
    }
    get id() {
        return this.props.id;
    }
    get frontstage() {
        var _a, _b;
        const contentGroup = (this.props.contentGroupProps instanceof ContentGroup_1.ContentGroupProvider) ? this.props.contentGroupProps : new ContentGroup_1.ContentGroup(this.props.contentGroupProps);
        return (React.createElement(Frontstage_1.Frontstage // eslint-disable-line deprecation/deprecation
        , { key: this.props.id, id: this.props.id, version: (_a = this.props.version) !== null && _a !== void 0 ? _a : 1.0, defaultTool: (_b = this.props.defaultTool) !== null && _b !== void 0 ? _b : CoreToolDefinitions_1.CoreTools.selectElementCommand, contentGroup: contentGroup, isInFooterMode: true, usage: this.props.usage, applicationData: this.props.applicationData, contentManipulationTools: React.createElement(Zone_1.Zone // eslint-disable-line deprecation/deprecation
            , { widgets: [
                    React.createElement(Widget_1.Widget, { id: `${this.props.id}-contentManipulationTools`, key: `${this.props.id}-contentManipulationTools`, isFreeform: true, element: React.createElement(ContentToolWidgetComposer_1.ContentToolWidgetComposer, { cornerButton: this.props.cornerButton }) }),
                ] }), viewNavigationTools: React.createElement(Zone_1.Zone // eslint-disable-line deprecation/deprecation
            , { widgets: [
                    React.createElement(Widget_1.Widget, { id: `${this.props.id}-viewNavigationTools`, key: `${this.props.id}-viewNavigationTools`, isFreeform: true, element: React.createElement(ViewToolWidgetComposer_1.ViewToolWidgetComposer, { hideNavigationAid: this.props.hideNavigationAid }) }),
                ] }), toolSettings: React.createElement(Zone_1.Zone // eslint-disable-line deprecation/deprecation
            , { widgets: this.props.hideToolSettings ? [] :
                    [
                        React.createElement(Widget_1.Widget, { id: `${this.props.id}-toolSettings`, key: `${this.props.id}-toolSettings`, isToolSettings: true }),
                    ] }), statusBar: React.createElement(Zone_1.Zone // eslint-disable-line deprecation/deprecation
            , { widgets: this.props.hideStatusBar ? [] :
                    [
                        React.createElement(Widget_1.Widget, { id: `${this.props.id}-statusBar`, key: `${this.props.id}-statusBar`, isStatusBar: true, control: StatusBarWidgetComposerControl_1.StatusBarWidgetComposerControl }),
                    ] }), leftPanel: React.createElement(StagePanel_1.StagePanel // eslint-disable-line deprecation/deprecation
            , { size: 300, pinned: false, defaultState: StagePanelDef_1.StagePanelState.Minimized, ...this.props.leftPanelProps }), topPanel: React.createElement(StagePanel_1.StagePanel // eslint-disable-line deprecation/deprecation
            , { size: 90, pinned: false, defaultState: StagePanelDef_1.StagePanelState.Minimized, ...this.props.topPanelProps }), rightPanel: React.createElement(StagePanel_1.StagePanel // eslint-disable-line deprecation/deprecation
            , { defaultState: StagePanelDef_1.StagePanelState.Open, ...this.props.rightPanelProps }), bottomPanel: React.createElement(StagePanel_1.StagePanel // eslint-disable-line deprecation/deprecation
            , { size: 180, defaultState: StagePanelDef_1.StagePanelState.Open, ...this.props.bottomPanelProps }) }));
    }
}
exports.StandardFrontstageProvider = StandardFrontstageProvider;
//# sourceMappingURL=StandardFrontstageProvider.js.map