/*---------------------------------------------------------------------------------------------
* 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 { StatusBarSection } from "@itwin/appui-abstract";
import { StatusBarItemUtilities } from "../statusbar/StatusBarItemUtilities";
import { ToolAssistanceField } from "../statusfields/toolassistance/ToolAssistanceField";
import { withStatusFieldProps } from "../statusbar/withStatusFieldProps";
import { MessageCenterField } from "../statusfields/MessageCenter";
import { withMessageCenterFieldProps } from "../statusbar/withMessageCenterFieldProps";
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";
/**
 * Provide standard statusbar fields for the SimpleStatusbarWidget
 * @beta
 */
export 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 = withMessageCenterFieldProps(MessageCenterField);
            statusBarItems.push(StatusBarItemUtilities.createStatusBarItem("uifw.MessageCenter", 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.createStatusBarItem("uifw.PreToolAssistance", StatusBarSection.Left, 15, React.createElement(StatusBarSeparator, null)));
            // eslint-disable-next-line deprecation/deprecation
            const ToolAssistance = withStatusFieldProps(ToolAssistanceField);
            statusBarItems.push(StatusBarItemUtilities.createStatusBarItem("uifw.ToolAssistance", StatusBarSection.Left, 20, React.createElement(ToolAssistance, null)));
            if (!this._defaultItems || this._defaultItems.postToolAssistanceSeparator)
                statusBarItems.push(StatusBarItemUtilities.createStatusBarItem("uifw.PostToolAssistance", StatusBarSection.Left, 25, React.createElement(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 = withStatusFieldProps(ActivityCenterField);
            statusBarItems.push(StatusBarItemUtilities.createStatusBarItem("uifw.ActivityCenter", StatusBarSection.Left, 30, React.createElement(ActivityCenter, null)));
        }
        // istanbul ignore else
        if (!this._defaultItems || this._defaultItems.accuSnapModePicker) {
            statusBarItems.push(StatusBarItemUtilities.createStatusBarItem("uifw.SnapMode", StatusBarSection.Center, 10, React.createElement(SnapModeField, null)));
        }
        // istanbul ignore else
        if (!this._defaultItems || this._defaultItems.tileLoadIndicator) {
            // eslint-disable-next-line deprecation/deprecation
            const TileLoadIndicator = withStatusFieldProps(TileLoadingIndicator);
            statusBarItems.push(StatusBarItemUtilities.createStatusBarItem("uifw.TileLoadIndicator", StatusBarSection.Right, 10, React.createElement(TileLoadIndicator, null)));
        }
        // istanbul ignore else
        if (!this._defaultItems || this._defaultItems.selectionScope) {
            // eslint-disable-next-line deprecation/deprecation
            const SelectionScope = withStatusFieldProps(SelectionScopeField);
            statusBarItems.push(StatusBarItemUtilities.createStatusBarItem("uifw.SelectionScope", StatusBarSection.Right, 20, React.createElement(SelectionScope, null)));
        }
        // istanbul ignore else
        if (!this._defaultItems || this._defaultItems.selectionInfo) {
            // eslint-disable-next-line deprecation/deprecation
            const SelectionInfo = withStatusFieldProps(SelectionInfoField);
            statusBarItems.push(StatusBarItemUtilities.createStatusBarItem("uifw.SelectionInfo", StatusBarSection.Right, 30, React.createElement(SelectionInfo, null)));
        }
        return statusBarItems;
    }
}
//# sourceMappingURL=StandardStatusbarUiItemsProvider.js.map