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