"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 MessageCenter_1 = require("../statusfields/MessageCenter");
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 statusbar fields for the SimpleStatusbarWidget
 * @beta
 */
class StandardStatusbarUiItemsProvider {
    get id() {
        return "appui-react:StandardStatusbarUiItemsProvider";
    }
    constructor(_defaultItems) {
        this._defaultItems = _defaultItems;
    }
    provideStatusBarItems(_stageId, _stageUsage, _stageAppData) {
        var _a;
        const statusBarItems = [];
        if (!this._defaultItems || this._defaultItems.messageCenter) {
            statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createCustomItem("uifw.MessageCenter", StatusBarItem_1.StatusBarSection.Left, 10, React.createElement(MessageCenter_1.MessageCenterField, null)));
        }
        if (!this._defaultItems || this._defaultItems.toolAssistance) {
            if (!this._defaultItems || this._defaultItems.preToolAssistanceSeparator)
                statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createCustomItem("uifw.PreToolAssistance", StatusBarItem_1.StatusBarSection.Left, 15, React.createElement(Separator_1.StatusBarSeparator, null)));
            statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createCustomItem("uifw.ToolAssistance", StatusBarItem_1.StatusBarSection.Left, 20, React.createElement(ToolAssistanceField_1.ToolAssistanceField, null)));
            if (!this._defaultItems || this._defaultItems.postToolAssistanceSeparator)
                statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createCustomItem("uifw.PostToolAssistance", StatusBarItem_1.StatusBarSection.Left, 25, React.createElement(Separator_1.StatusBarSeparator, null)));
        }
        if ((_a = this._defaultItems) === null || _a === void 0 ? void 0 : _a.activityCenter) {
            statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createCustomItem("uifw.ActivityCenter", StatusBarItem_1.StatusBarSection.Left, 30, React.createElement(ActivityCenter_1.ActivityCenterField, null)));
        }
        if (!this._defaultItems || this._defaultItems.accuSnapModePicker) {
            statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createCustomItem("uifw.SnapMode", StatusBarItem_1.StatusBarSection.Center, 10, React.createElement(SnapMode_1.SnapModeField, null)));
        }
        if (!this._defaultItems || this._defaultItems.tileLoadIndicator) {
            statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createCustomItem("uifw.TileLoadIndicator", StatusBarItem_1.StatusBarSection.Right, 10, React.createElement(TileLoadingIndicator_1.TileLoadingIndicator, null)));
        }
        if (!this._defaultItems || this._defaultItems.selectionScope) {
            statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createCustomItem("uifw.SelectionScope", StatusBarItem_1.StatusBarSection.Right, 20, React.createElement(SelectionScope_1.SelectionScopeField, null)));
        }
        if (!this._defaultItems || this._defaultItems.selectionInfo) {
            statusBarItems.push(StatusBarItemUtilities_1.StatusBarItemUtilities.createCustomItem("uifw.SelectionInfo", StatusBarItem_1.StatusBarSection.Right, 30, React.createElement(SelectionInfo_1.SelectionInfoField, null)));
        }
        return statusBarItems;
    }
}
exports.StandardStatusbarUiItemsProvider = StandardStatusbarUiItemsProvider;
//# sourceMappingURL=StandardStatusbarUiItemsProvider.js.map