/*---------------------------------------------------------------------------------------------
 * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
 * See LICENSE.md in the project root for license terms and full copyright notice.
 *--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
 * @module StandardUiItemsProvider
 */
import * as React from "react";
import { StatusBarItemUtilities } from "../statusbar/StatusBarItemUtilities";
import { ToolAssistanceField } from "../statusfields/toolassistance/ToolAssistanceField";
import { MessageCenterField } from "../statusfields/message-center/MessageCenterField";
import { ActivityCenterField } from "../statusfields/ActivityCenter";
import { SnapModeField } from "../statusfields/SnapMode";
import { SelectionInfoField } from "../statusfields/SelectionInfo";
import { TileLoadingIndicator } from "../statusfields/tileloading/TileLoadingIndicator";
import { SelectionScopeField } from "../statusfields/SelectionScope";
import { StatusBarSeparator } from "../statusbar/Separator";
import { StatusBarSection } from "../statusbar/StatusBarItem";
/** Provide standard status bar fields.
 * @beta
 */
export class StandardStatusbarUiItemsProvider {
    get id() {
        return "appui-react:StandardStatusbarUiItemsProvider";
    }
    /** Creates a provider. If the `defaultItems` argument is not set, all default fields are added. Otherwise, only the fields that are set to `true` are added. */
    constructor(_defaultItems) {
        this._defaultItems = _defaultItems;
    }
    provideStatusBarItems(_stageId, _stageUsage, _stageAppData) {
        const statusBarItems = [];
        if (!this._defaultItems || this._defaultItems.messageCenter) {
            statusBarItems.push(StatusBarItemUtilities.createCustomItem({
                id: "uifw.MessageCenter",
                section: StatusBarSection.Left,
                itemPriority: 10,
                content: React.createElement(MessageCenterField, null),
            }));
        }
        if (!this._defaultItems || this._defaultItems.toolAssistance) {
            if (!this._defaultItems || this._defaultItems.preToolAssistanceSeparator)
                statusBarItems.push(StatusBarItemUtilities.createCustomItem({
                    id: "uifw.PreToolAssistance",
                    section: StatusBarSection.Left,
                    itemPriority: 15,
                    content: React.createElement(StatusBarSeparator, null),
                }));
            statusBarItems.push(StatusBarItemUtilities.createCustomItem({
                id: "uifw.ToolAssistance",
                section: StatusBarSection.Left,
                itemPriority: 20,
                content: React.createElement(ToolAssistanceField, null),
            }));
            if (!this._defaultItems || this._defaultItems.postToolAssistanceSeparator)
                statusBarItems.push(StatusBarItemUtilities.createCustomItem({
                    id: "uifw.PostToolAssistance",
                    section: StatusBarSection.Left,
                    itemPriority: 25,
                    content: React.createElement(StatusBarSeparator, null),
                }));
        }
        if (this._defaultItems?.activityCenter) {
            statusBarItems.push(StatusBarItemUtilities.createCustomItem({
                id: "uifw.ActivityCenter",
                section: StatusBarSection.Left,
                itemPriority: 30,
                content: React.createElement(ActivityCenterField, null),
            }));
        }
        if (!this._defaultItems || this._defaultItems.accuSnapModePicker) {
            statusBarItems.push(StatusBarItemUtilities.createCustomItem({
                id: "uifw.SnapMode",
                section: StatusBarSection.Center,
                itemPriority: 10,
                content: React.createElement(SnapModeField, null),
            }));
        }
        if (!this._defaultItems || this._defaultItems.tileLoadIndicator) {
            statusBarItems.push(StatusBarItemUtilities.createCustomItem({
                id: "uifw.TileLoadIndicator",
                section: StatusBarSection.Right,
                itemPriority: 10,
                content: React.createElement(TileLoadingIndicator, null),
            }));
        }
        if (!this._defaultItems || this._defaultItems.selectionScope) {
            statusBarItems.push(StatusBarItemUtilities.createCustomItem({
                id: "uifw.SelectionScope",
                section: StatusBarSection.Right,
                itemPriority: 20,
                content: React.createElement(SelectionScopeField, null),
            }));
        }
        if (!this._defaultItems || this._defaultItems.selectionInfo) {
            statusBarItems.push(StatusBarItemUtilities.createCustomItem({
                id: "uifw.SelectionInfo",
                section: StatusBarSection.Right,
                itemPriority: 30,
                // eslint-disable-next-line deprecation/deprecation
                content: React.createElement(SelectionInfoField, null),
            }));
        }
        return statusBarItems;
    }
}
//# sourceMappingURL=StandardStatusbarUiItemsProvider.js.map