/*---------------------------------------------------------------------------------------------
 * 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 { ViewClipByPlaneTool } from "@itwin/core-frontend";
import { StandardContentToolsUiItemsProvider } from "./StandardContentToolsUiItemsProvider.js";
import { UiItemsManager } from "./UiItemsManager.js";
import { BaseUiItemsProvider } from "./BaseUiItemsProvider.js";
/** Provide standard tools for the ContentManipulationWidgetComposer.
 * @public
 * @deprecated in 4.17.0. Use {@link StandardContentToolsUiItemsProvider} instead. Supported frontstages can be specified when registering the provider.
 */
// eslint-disable-next-line @typescript-eslint/no-deprecated
export class StandardContentToolsProvider extends 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) {
        // eslint-disable-next-line @typescript-eslint/no-deprecated
        const provider = new StandardContentToolsProvider(providerId, defaultContentTools, isSupportedStage);
        UiItemsManager.register(provider);
        // register core commands not automatically registered
        ViewClipByPlaneTool.register();
        return provider;
    }
    constructor(providerId, defaultContentTools, isSupportedStage) {
        super(providerId, isSupportedStage);
        this.uiItemsProvider = new StandardContentToolsUiItemsProvider(defaultContentTools);
    }
    provideToolbarItemsInternal(_stageId, _stageUsage, toolbarUsage, toolbarOrientation, stageAppData) {
        // eslint-disable-next-line @typescript-eslint/no-deprecated
        return this.uiItemsProvider.provideToolbarItems(_stageId, _stageUsage, toolbarUsage, toolbarOrientation, stageAppData);
    }
    provideStatusBarItemsInternal(_stageId, _stageUsage, _stageAppData) {
        // eslint-disable-next-line @typescript-eslint/no-deprecated
        return this.uiItemsProvider.provideStatusBarItems(_stageId, _stageUsage, _stageAppData);
    }
}
//# sourceMappingURL=StandardContentToolsProvider.js.map