/*---------------------------------------------------------------------------------------------
 * 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 { ContentToolWidgetComposer } from "../widgets/ContentToolWidgetComposer";
import { ViewToolWidgetComposer } from "../widgets/ViewToolWidgetComposer";
import { StatusBarComposer } from "../statusbar/StatusBarComposer";
import { StagePanelState } from "../stagepanels/StagePanelState";
/** Helper namespace to create frontstages.
 * @beta
 */
export 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 ContentGroupProvider
            ? props.contentGroupProps
            : new 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, { cornerButton: props.cornerButton })),
            },
            viewNavigation: {
                id: `${props.id}-viewNavigationTools`,
                content: (React.createElement(ViewToolWidgetComposer, { hideNavigationAid: props.hideNavigationAid })),
            },
            toolSettings: props.hideToolSettings
                ? undefined
                : {
                    id: `${props.id}-toolSettings`,
                },
            statusBar: props.hideStatusBar
                ? undefined
                : {
                    id: `${props.id}-statusBar`,
                    content: React.createElement(StatusBarComposer, { items: [] }),
                },
            leftPanel: {
                sizeSpec: 300,
                pinned: false,
                defaultState: StagePanelState.Minimized,
                ...props.leftPanelProps,
            },
            topPanel: {
                sizeSpec: 90,
                pinned: false,
                defaultState: StagePanelState.Minimized,
                ...props.topPanelProps,
            },
            rightPanel: {
                defaultState: StagePanelState.Open,
                ...props.rightPanelProps,
            },
            bottomPanel: {
                sizeSpec: 180,
                defaultState: StagePanelState.Open,
                ...props.bottomPanelProps,
            },
        };
    }
    FrontstageUtilities.createStandardFrontstage = createStandardFrontstage;
})(FrontstageUtilities || (FrontstageUtilities = {}));
//# sourceMappingURL=FrontstageUtilities.js.map