"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 ContentGroup_1 = require("../content/ContentGroup");
const FrontstageProvider_1 = require("./FrontstageProvider");
const ContentToolWidgetComposer_1 = require("../widgets/ContentToolWidgetComposer");
const ViewToolWidgetComposer_1 = require("../widgets/ViewToolWidgetComposer");
const StagePanelDef_1 = require("../stagepanels/StagePanelDef");
const StatusBarComposer_1 = require("../statusbar/StatusBarComposer");
/**
 * FrontstageProvider that provides an "empty" stage. All tool buttons, statusbar items, and widgets must
 * be provided by one or more item providers, see [[UiItemsProvider]].
 * @public
 */
class StandardFrontstageProvider extends FrontstageProvider_1.FrontstageProvider {
    constructor(props) {
        super();
        this.props = props;
    }
    get id() {
        return this.props.id;
    }
    frontstageConfig() {
        const contentGroup = this.props.contentGroupProps instanceof ContentGroup_1.ContentGroupProvider
            ? this.props.contentGroupProps
            : new ContentGroup_1.ContentGroup(this.props.contentGroupProps);
        return {
            id: this.props.id,
            version: this.props.version ?? 1.0,
            contentGroup,
            usage: this.props.usage,
            defaultTool: this.props.defaultTool,
            contentManipulation: {
                id: `${this.props.id}-contentManipulationTools`,
                content: (React.createElement(ContentToolWidgetComposer_1.ContentToolWidgetComposer, { cornerButton: this.props.cornerButton })),
            },
            viewNavigation: {
                id: `${this.props.id}-viewNavigationTools`,
                content: (React.createElement(ViewToolWidgetComposer_1.ViewToolWidgetComposer, { hideNavigationAid: this.props.hideNavigationAid })),
            },
            toolSettings: this.props.hideToolSettings
                ? undefined
                : {
                    id: `${this.props.id}-toolSettings`,
                },
            statusBar: this.props.hideStatusBar
                ? undefined
                : {
                    id: `${this.props.id}-statusBar`,
                    content: React.createElement(StatusBarComposer_1.StatusBarComposer, { items: [] }),
                },
            leftPanel: {
                size: 300,
                pinned: false,
                defaultState: StagePanelDef_1.StagePanelState.Minimized,
                ...this.props.leftPanelProps,
            },
            topPanel: {
                size: 90,
                pinned: false,
                defaultState: StagePanelDef_1.StagePanelState.Minimized,
                ...this.props.topPanelProps,
            },
            rightPanel: {
                defaultState: StagePanelDef_1.StagePanelState.Open,
                ...this.props.rightPanelProps,
            },
            bottomPanel: {
                size: 180,
                defaultState: StagePanelDef_1.StagePanelState.Open,
                ...this.props.bottomPanelProps,
            },
        };
    }
}
exports.StandardFrontstageProvider = StandardFrontstageProvider;
//# sourceMappingURL=StandardFrontstageProvider.js.map