"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.StandardStatusbarItemsProvider = void 0;
const StandardStatusbarUiItemsProvider_1 = require("./StandardStatusbarUiItemsProvider");
const UiItemsManager_1 = require("./UiItemsManager");
const BaseUiItemsProvider_1 = require("./BaseUiItemsProvider");
/**
 * Provide standard statusbar fields for the SimpleStatusbarWidget
 * @public
 */
class StandardStatusbarItemsProvider extends BaseUiItemsProvider_1.BaseUiItemsProvider {
    constructor(providerId, _defaultItems, isSupportedStage) {
        super(providerId, isSupportedStage);
        this.uiItemsProvider = new StandardStatusbarUiItemsProvider_1.StandardStatusbarUiItemsProvider(_defaultItems);
    }
    /**
     * static function to register the StandardStatusbarItemsProvider
     * @param providerId - unique identifier for this instance of the provider. This is required in case separate packages want
     * to set up custom stage with their own subset of standard status bar items.
     * @param defaultItems - if undefined all available item are provided to stage except for activityCenter. If defined only those
     * specific tool buttons are shown.
     * @param isSupportedStage - optional function that will be called to determine if tools should be added to current stage. If not set and
     * the current stage's `usage` is set to `StageUsage.General` then the provider will add items to frontstage.
     */
    static register(providerId, defaultItems, isSupportedStage) {
        const provider = new StandardStatusbarItemsProvider(providerId, defaultItems, isSupportedStage);
        UiItemsManager_1.UiItemsManager.register(provider);
        return provider;
    }
    provideStatusBarItemsInternal(_stageId, _stageUsage, _stageAppData) {
        return this.uiItemsProvider.provideStatusBarItems(_stageId, _stageUsage, _stageAppData);
    }
}
exports.StandardStatusbarItemsProvider = StandardStatusbarItemsProvider;
//# sourceMappingURL=StandardStatusbarItemsProvider.js.map