"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 ToolbarItem_1 = require("../toolbar/ToolbarItem");
const ToolbarItems_1 = require("../tools/ToolbarItems");
/**
 * Provide standard tools for the ViewNavigationWidgetComposer.
 * @beta
 */
class StandardNavigationToolsUiItemsProvider {
    get id() {
        return "appui-react:StandardNavigationToolsUiItemsProvider";
    }
    constructor(defaultNavigationTools) {
        this.defaultNavigationTools = defaultNavigationTools;
    }
    provideToolbarItems(_stageId, _stageUsage, toolbarUsage, toolbarOrientation, _stageAppData) {
        const items = [];
        if (toolbarUsage === ToolbarItem_1.ToolbarUsage.ViewNavigation &&
            toolbarOrientation === ToolbarItem_1.ToolbarOrientation.Horizontal) {
            if (!this.defaultNavigationTools ||
                !this.defaultNavigationTools.horizontal ||
                this.defaultNavigationTools.horizontal.rotateView)
                items.push(ToolbarItems_1.ToolbarItems.createRotateView({
                    itemPriority: 10,
                }));
            if (!this.defaultNavigationTools ||
                !this.defaultNavigationTools.horizontal ||
                this.defaultNavigationTools.horizontal.panView)
                items.push(ToolbarItems_1.ToolbarItems.createPanView({
                    itemPriority: 20,
                }));
            if (!this.defaultNavigationTools ||
                !this.defaultNavigationTools.horizontal ||
                this.defaultNavigationTools.horizontal.fitView) {
                items.push(ToolbarItems_1.ToolbarItems.createFitView({
                    itemPriority: 30,
                }));
            }
            if (!this.defaultNavigationTools ||
                !this.defaultNavigationTools.horizontal ||
                this.defaultNavigationTools.horizontal.windowArea) {
                items.push(ToolbarItems_1.ToolbarItems.createWindowArea({
                    itemPriority: 40,
                }));
            }
            if (!this.defaultNavigationTools ||
                !this.defaultNavigationTools.horizontal ||
                this.defaultNavigationTools.horizontal.viewUndoRedo) {
                items.push(ToolbarItems_1.ToolbarItems.createViewUndo({
                    itemPriority: 50,
                }));
                items.push(ToolbarItems_1.ToolbarItems.createViewRedo({
                    itemPriority: 60,
                }));
            }
        }
        else if (toolbarUsage === ToolbarItem_1.ToolbarUsage.ViewNavigation &&
            toolbarOrientation === ToolbarItem_1.ToolbarOrientation.Vertical) {
            if (!this.defaultNavigationTools ||
                !this.defaultNavigationTools.vertical ||
                this.defaultNavigationTools.vertical.setupWalkCamera)
                items.push(ToolbarItems_1.ToolbarItems.createSetupWalkCamera({
                    itemPriority: 5,
                }));
            if (!this.defaultNavigationTools ||
                !this.defaultNavigationTools.vertical ||
                this.defaultNavigationTools.vertical.walk)
                items.push(ToolbarItems_1.ToolbarItems.createWalkView({
                    itemPriority: 10,
                }));
            if (!this.defaultNavigationTools ||
                !this.defaultNavigationTools.vertical ||
                this.defaultNavigationTools.vertical.toggleCamera)
                items.push(ToolbarItems_1.ToolbarItems.createToggleCameraView({
                    itemPriority: 20,
                }));
        }
        return items;
    }
}
exports.StandardNavigationToolsUiItemsProvider = StandardNavigationToolsUiItemsProvider;
//# sourceMappingURL=StandardNavigationToolsUiItemsProvider.js.map