/*---------------------------------------------------------------------------------------------
 * 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.js";
import { ToolAssistanceField } from "../statusfields/toolassistance/ToolAssistanceField.js";
import { MessageCenterField } from "../statusfields/message-center/MessageCenterField.js";
import { ActivityCenterField } from "../statusfields/ActivityCenter.js";
import { SnapModeField } from "../statusfields/SnapMode.js";
import { SelectionInfoField } from "../statusfields/SelectionInfo.js";
import { TileLoadingIndicator } from "../statusfields/tileloading/TileLoadingIndicator.js";
import { SelectionScopeField } from "../statusfields/SelectionScope.js";
import { StatusBarSeparator } from "../statusbar/Separator.js";
import { StatusBarSection } from "../statusbar/StatusBarItem.js";
/** Provides standard status bar items.
 * @public
 */
export class StandardStatusbarUiItemsProvider {
    _defaultItems;
    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;
    }
    /** @deprecated in 4.17.0. Property of a deprecated interface {@link UiItemsProvider.provideStatusBarItems}. */
    provideStatusBarItems(_stageId, _stageUsage, _stageAppData) {
        return this.getStatusBarItems();
    }
    getStatusBarItems() {
        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 @typescript-eslint/no-deprecated
                content: React.createElement(SelectionInfoField, null),
            }));
        }
        return statusBarItems;
    }
}
//# sourceMappingURL=StandardStatusbarUiItemsProvider.js.map