/*---------------------------------------------------------------------------------------------
 * 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 { ContentGroup, ContentGroupProvider } from "../content/ContentGroup";
import { FrontstageProvider } from "./FrontstageProvider";
import { ContentToolWidgetComposer } from "../widgets/ContentToolWidgetComposer";
import { ViewToolWidgetComposer } from "../widgets/ViewToolWidgetComposer";
import { StagePanelState } from "../stagepanels/StagePanelDef";
import { StatusBarComposer } from "../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
 */
export class StandardFrontstageProvider extends FrontstageProvider {
    constructor(props) {
        super();
        this.props = props;
    }
    get id() {
        return this.props.id;
    }
    frontstageConfig() {
        const contentGroup = this.props.contentGroupProps instanceof ContentGroupProvider
            ? this.props.contentGroupProps
            : new 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, { cornerButton: this.props.cornerButton })),
            },
            viewNavigation: {
                id: `${this.props.id}-viewNavigationTools`,
                content: (React.createElement(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, { items: [] }),
                },
            leftPanel: {
                size: 300,
                pinned: false,
                defaultState: StagePanelState.Minimized,
                ...this.props.leftPanelProps,
            },
            topPanel: {
                size: 90,
                pinned: false,
                defaultState: StagePanelState.Minimized,
                ...this.props.topPanelProps,
            },
            rightPanel: {
                defaultState: StagePanelState.Open,
                ...this.props.rightPanelProps,
            },
            bottomPanel: {
                size: 180,
                defaultState: StagePanelState.Open,
                ...this.props.bottomPanelProps,
            },
        };
    }
}
//# sourceMappingURL=StandardFrontstageProvider.js.map