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