"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.StandardContentToolsProvider = void 0;
const core_frontend_1 = require("@itwin/core-frontend");
const StandardContentToolsUiItemsProvider_1 = require("./StandardContentToolsUiItemsProvider");
const UiItemsManager_1 = require("./UiItemsManager");
const BaseUiItemsProvider_1 = require("./BaseUiItemsProvider");
/**
 * Provide standard tools for the ContentManipulationWidgetComposer.
 * @public
 */
class StandardContentToolsProvider extends BaseUiItemsProvider_1.BaseUiItemsProvider {
    /**
     * static function to register the StandardContentToolsProvider
     * @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 tools.
     * @param defaultContentTools - if undefined all available tools are provided to stage. 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, defaultContentTools, isSupportedStage) {
        const provider = new StandardContentToolsProvider(providerId, defaultContentTools, isSupportedStage);
        UiItemsManager_1.UiItemsManager.register(provider);
        // register core commands not automatically registered
        core_frontend_1.ViewClipByPlaneTool.register();
        return provider;
    }
    constructor(providerId, defaultContentTools, isSupportedStage) {
        super(providerId, isSupportedStage);
        this.uiItemsProvider = new StandardContentToolsUiItemsProvider_1.StandardContentToolsUiItemsProvider(defaultContentTools);
    }
    provideToolbarItemsInternal(_stageId, _stageUsage, toolbarUsage, toolbarOrientation, stageAppData) {
        // eslint-disable-next-line deprecation/deprecation
        return this.uiItemsProvider.provideToolbarItems(_stageId, _stageUsage, toolbarUsage, toolbarOrientation, stageAppData);
    }
    provideStatusBarItemsInternal(_stageId, _stageUsage, _stageAppData) {
        // eslint-disable-next-line deprecation/deprecation
        return this.uiItemsProvider.provideStatusBarItems(_stageId, _stageUsage, _stageAppData);
    }
}
exports.StandardContentToolsProvider = StandardContentToolsProvider;
//# sourceMappingURL=StandardContentToolsProvider.js.map