"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 StandardUiItemsProvider
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.StandardStatusbarUiItemsProvider = void 0;
const React = require("react");
const StatusBarItemUtilities_1 = require("../statusbar/StatusBarItemUtilities");
const ToolAssistanceField_1 = require("../statusfields/toolassistance/ToolAssistanceField");
const MessageCenterField_1 = require("../statusfields/message-center/MessageCenterField");
const ActivityCenter_1 = require("../statusfields/ActivityCenter");
const SnapMode_1 = require("../statusfields/SnapMode");
const SelectionInfo_1 = require("../statusfields/SelectionInfo");
const TileLoadingIndicator_1 = require("../statusfields/tileloading/TileLoadingIndicator");
const SelectionScope_1 = require("../statusfields/SelectionScope");
const Separator_1 = require("../statusbar/Separator");
const StatusBarItem_1 = require("../statusbar/StatusBarItem");
/** Provide standard status bar fields.
 * @beta
 */
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_1.StatusBarItemUtilities.createCustomItem({
                id: "uifw.MessageCenter",
                section: StatusBarItem_1.StatusBarSection.Left,
                itemPriority: 10,
                content: React.createElement(MessageCenterField_1.MessageCenterField, null),
            }));
        }
        if (!this._defaultItems || this._defaultItems.toolAssistance) {
            if (!this._defaultItems || this._defaultItems.preToolAssistanceSeparator)
                statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createCustomItem({
                    id: "uifw.PreToolAssistance",
                    section: StatusBarItem_1.StatusBarSection.Left,
                    itemPriority: 15,
                    content: React.createElement(Separator_1.StatusBarSeparator, null),
                }));
            statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createCustomItem({
                id: "uifw.ToolAssistance",
                section: StatusBarItem_1.StatusBarSection.Left,
                itemPriority: 20,
                content: React.createElement(ToolAssistanceField_1.ToolAssistanceField, null),
            }));
            if (!this._defaultItems || this._defaultItems.postToolAssistanceSeparator)
                statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createCustomItem({
                    id: "uifw.PostToolAssistance",
                    section: StatusBarItem_1.StatusBarSection.Left,
                    itemPriority: 25,
                    content: React.createElement(Separator_1.StatusBarSeparator, null),
                }));
        }
        if (this._defaultItems?.activityCenter) {
            statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createCustomItem({
                id: "uifw.ActivityCenter",
                section: StatusBarItem_1.StatusBarSection.Left,
                itemPriority: 30,
                content: React.createElement(ActivityCenter_1.ActivityCenterField, null),
            }));
        }
        if (!this._defaultItems || this._defaultItems.accuSnapModePicker) {
            statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createCustomItem({
                id: "uifw.SnapMode",
                section: StatusBarItem_1.StatusBarSection.Center,
                itemPriority: 10,
                content: React.createElement(SnapMode_1.SnapModeField, null),
            }));
        }
        if (!this._defaultItems || this._defaultItems.tileLoadIndicator) {
            statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createCustomItem({
                id: "uifw.TileLoadIndicator",
                section: StatusBarItem_1.StatusBarSection.Right,
                itemPriority: 10,
                content: React.createElement(TileLoadingIndicator_1.TileLoadingIndicator, null),
            }));
        }
        if (!this._defaultItems || this._defaultItems.selectionScope) {
            statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createCustomItem({
                id: "uifw.SelectionScope",
                section: StatusBarItem_1.StatusBarSection.Right,
                itemPriority: 20,
                content: React.createElement(SelectionScope_1.SelectionScopeField, null),
            }));
        }
        if (!this._defaultItems || this._defaultItems.selectionInfo) {
            statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createCustomItem({
                id: "uifw.SelectionInfo",
                section: StatusBarItem_1.StatusBarSection.Right,
                itemPriority: 30,
                // eslint-disable-next-line deprecation/deprecation
                content: React.createElement(SelectionInfo_1.SelectionInfoField, null),
            }));
        }
        return statusBarItems;
    }
}
exports.StandardStatusbarUiItemsProvider = StandardStatusbarUiItemsProvider;
//# sourceMappingURL=StandardStatusbarUiItemsProvider.js.map