/*---------------------------------------------------------------------------------------------
* 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
 */
import * as React from "react";
import { StagePanel } from "../stagepanels/StagePanel";
import { ContentGroup, ContentGroupProvider } from "../content/ContentGroup";
import { FrontstageProvider } from "./FrontstageProvider";
import { Frontstage } from "./Frontstage";
import { CoreTools } from "../tools/CoreToolDefinitions";
import { Zone } from "../zones/Zone";
import { ContentToolWidgetComposer } from "../widgets/ContentToolWidgetComposer";
import { Widget } from "../widgets/Widget";
import { ViewToolWidgetComposer } from "../widgets/ViewToolWidgetComposer";
import { StatusBarWidgetComposerControl } from "../widgets/StatusBarWidgetComposerControl";
import { StagePanelState } from "../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
 */
export class StandardFrontstageProvider extends FrontstageProvider {
    constructor(props) {
        super();
        this.props = props;
    }
    get id() {
        return this.props.id;
    }
    get frontstage() {
        var _a, _b;
        const contentGroup = (this.props.contentGroupProps instanceof ContentGroupProvider) ? this.props.contentGroupProps : new ContentGroup(this.props.contentGroupProps);
        return (React.createElement(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 : CoreTools.selectElementCommand, contentGroup: contentGroup, isInFooterMode: true, usage: this.props.usage, applicationData: this.props.applicationData, contentManipulationTools: React.createElement(Zone // eslint-disable-line deprecation/deprecation
            , { widgets: [
                    React.createElement(Widget, { id: `${this.props.id}-contentManipulationTools`, key: `${this.props.id}-contentManipulationTools`, isFreeform: true, element: React.createElement(ContentToolWidgetComposer, { cornerButton: this.props.cornerButton }) }),
                ] }), viewNavigationTools: React.createElement(Zone // eslint-disable-line deprecation/deprecation
            , { widgets: [
                    React.createElement(Widget, { id: `${this.props.id}-viewNavigationTools`, key: `${this.props.id}-viewNavigationTools`, isFreeform: true, element: React.createElement(ViewToolWidgetComposer, { hideNavigationAid: this.props.hideNavigationAid }) }),
                ] }), toolSettings: React.createElement(Zone // eslint-disable-line deprecation/deprecation
            , { widgets: this.props.hideToolSettings ? [] :
                    [
                        React.createElement(Widget, { id: `${this.props.id}-toolSettings`, key: `${this.props.id}-toolSettings`, isToolSettings: true }),
                    ] }), statusBar: React.createElement(Zone // eslint-disable-line deprecation/deprecation
            , { widgets: this.props.hideStatusBar ? [] :
                    [
                        React.createElement(Widget, { id: `${this.props.id}-statusBar`, key: `${this.props.id}-statusBar`, isStatusBar: true, control: StatusBarWidgetComposerControl }),
                    ] }), leftPanel: React.createElement(StagePanel // eslint-disable-line deprecation/deprecation
            , { size: 300, pinned: false, defaultState: StagePanelState.Minimized, ...this.props.leftPanelProps }), topPanel: React.createElement(StagePanel // eslint-disable-line deprecation/deprecation
            , { size: 90, pinned: false, defaultState: StagePanelState.Minimized, ...this.props.topPanelProps }), rightPanel: React.createElement(StagePanel // eslint-disable-line deprecation/deprecation
            , { defaultState: StagePanelState.Open, ...this.props.rightPanelProps }), bottomPanel: React.createElement(StagePanel // eslint-disable-line deprecation/deprecation
            , { size: 180, defaultState: StagePanelState.Open, ...this.props.bottomPanelProps }) }));
    }
}
//# sourceMappingURL=StandardFrontstageProvider.js.map