"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.StandardNavigationToolsUiItemsProvider = void 0;
const appui_abstract_1 = require("@itwin/appui-abstract");
const ToolbarHelper_1 = require("../toolbar/ToolbarHelper");
const CoreToolDefinitions_1 = require("../tools/CoreToolDefinitions");
/**
 * Provide standard tools for the ViewNavigationWidgetComposer.
 * @beta
 */
class StandardNavigationToolsUiItemsProvider {
    constructor(defaultNavigationTools) {
        this.defaultNavigationTools = defaultNavigationTools;
    }
    get id() { return "appui-react:StandardNavigationToolsUiItemsProvider"; }
    provideToolbarButtonItems(_stageId, _stageUsage, toolbarUsage, toolbarOrientation, _stageAppData) {
        const items = [];
        if (toolbarUsage === appui_abstract_1.ToolbarUsage.ViewNavigation && toolbarOrientation === appui_abstract_1.ToolbarOrientation.Horizontal) { // eslint-disable-line deprecation/deprecation
            if (!this.defaultNavigationTools || !this.defaultNavigationTools.horizontal || this.defaultNavigationTools.horizontal.rotateView)
                items.push(ToolbarHelper_1.ToolbarHelper.createToolbarItemFromItemDef(10, CoreToolDefinitions_1.CoreTools.rotateViewCommand));
            if (!this.defaultNavigationTools || !this.defaultNavigationTools.horizontal || this.defaultNavigationTools.horizontal.panView)
                items.push(ToolbarHelper_1.ToolbarHelper.createToolbarItemFromItemDef(20, CoreToolDefinitions_1.CoreTools.panViewCommand));
            if (!this.defaultNavigationTools || !this.defaultNavigationTools.horizontal || this.defaultNavigationTools.horizontal.fitView) {
                items.push(ToolbarHelper_1.ToolbarHelper.createToolbarItemFromItemDef(30, CoreToolDefinitions_1.CoreTools.fitViewCommand));
            }
            if (!this.defaultNavigationTools || !this.defaultNavigationTools.horizontal || this.defaultNavigationTools.horizontal.windowArea) {
                items.push(ToolbarHelper_1.ToolbarHelper.createToolbarItemFromItemDef(40, CoreToolDefinitions_1.CoreTools.windowAreaCommand));
            }
            if (!this.defaultNavigationTools || !this.defaultNavigationTools.horizontal || this.defaultNavigationTools.horizontal.viewUndoRedo) {
                items.push(ToolbarHelper_1.ToolbarHelper.createToolbarItemFromItemDef(50, CoreToolDefinitions_1.CoreTools.viewUndoCommand));
                items.push(ToolbarHelper_1.ToolbarHelper.createToolbarItemFromItemDef(60, CoreToolDefinitions_1.CoreTools.viewRedoCommand));
            }
        }
        else /* istanbul ignore else */ if (toolbarUsage === appui_abstract_1.ToolbarUsage.ViewNavigation && toolbarOrientation === appui_abstract_1.ToolbarOrientation.Vertical) { // eslint-disable-line deprecation/deprecation
            if (!this.defaultNavigationTools || !this.defaultNavigationTools.vertical || this.defaultNavigationTools.vertical.setupWalkCamera)
                items.push(ToolbarHelper_1.ToolbarHelper.createToolbarItemFromItemDef(5, CoreToolDefinitions_1.CoreTools.setupCameraWalkTool));
            if (!this.defaultNavigationTools || !this.defaultNavigationTools.vertical || this.defaultNavigationTools.vertical.walk)
                items.push(ToolbarHelper_1.ToolbarHelper.createToolbarItemFromItemDef(10, CoreToolDefinitions_1.CoreTools.walkViewCommand));
            if (!this.defaultNavigationTools || !this.defaultNavigationTools.vertical || this.defaultNavigationTools.vertical.toggleCamera)
                items.push(ToolbarHelper_1.ToolbarHelper.createToolbarItemFromItemDef(20, CoreToolDefinitions_1.CoreTools.toggleCameraViewCommand));
        }
        return items;
    }
}
exports.StandardNavigationToolsUiItemsProvider = StandardNavigationToolsUiItemsProvider;
//# sourceMappingURL=StandardNavigationToolsUiItemsProvider.js.map