/*---------------------------------------------------------------------------------------------
 * 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.js";
import { ToolbarItems } from "../tools/ToolbarItems.js";
/** Provide standard view navigation items.
 * @public
 */
export class StandardNavigationToolsUiItemsProvider {
    get id() {
        return "appui-react:StandardNavigationToolsUiItemsProvider";
    }
    constructor(defaultNavigationTools) {
        this.defaultNavigationTools = defaultNavigationTools;
    }
    /** @deprecated in 4.17.0. Property of a deprecated interface {@link UiItemsProvider.provideToolbarItems}. */
    provideToolbarItems(_stageId, _stageUsage, toolbarUsage, toolbarOrientation, _stageAppData) {
        return this.getToolbarItems().filter((item) => item.layouts?.standard?.orientation === toolbarOrientation &&
            item.layouts?.standard?.usage === toolbarUsage);
    }
    getToolbarItems() {
        const items = [];
        const horizontal = {
            standard: {
                orientation: ToolbarOrientation.Horizontal,
                usage: ToolbarUsage.ViewNavigation,
            },
        };
        if (!this.defaultNavigationTools ||
            !this.defaultNavigationTools.horizontal ||
            this.defaultNavigationTools.horizontal.rotateView)
            items.push(ToolbarItems.createRotateView({
                itemPriority: 10,
                layouts: horizontal,
            }));
        if (!this.defaultNavigationTools ||
            !this.defaultNavigationTools.horizontal ||
            this.defaultNavigationTools.horizontal.panView)
            items.push(ToolbarItems.createPanView({
                itemPriority: 20,
                layouts: horizontal,
            }));
        if (!this.defaultNavigationTools ||
            !this.defaultNavigationTools.horizontal ||
            this.defaultNavigationTools.horizontal.fitView) {
            items.push(ToolbarItems.createFitView({
                itemPriority: 30,
                layouts: horizontal,
            }));
        }
        if (!this.defaultNavigationTools ||
            !this.defaultNavigationTools.horizontal ||
            this.defaultNavigationTools.horizontal.windowArea) {
            items.push(ToolbarItems.createWindowArea({
                itemPriority: 40,
                layouts: horizontal,
            }));
        }
        if (!this.defaultNavigationTools ||
            !this.defaultNavigationTools.horizontal ||
            this.defaultNavigationTools.horizontal.viewUndoRedo) {
            items.push(ToolbarItems.createViewUndo({
                itemPriority: 50,
                layouts: horizontal,
            }));
            items.push(ToolbarItems.createViewRedo({
                itemPriority: 60,
                layouts: horizontal,
            }));
        }
        const vertical = {
            standard: {
                orientation: ToolbarOrientation.Vertical,
                usage: ToolbarUsage.ViewNavigation,
            },
        };
        if (!this.defaultNavigationTools ||
            !this.defaultNavigationTools.vertical ||
            this.defaultNavigationTools.vertical.setupWalkCamera)
            items.push(ToolbarItems.createSetupWalkCamera({
                itemPriority: 5,
                layouts: vertical,
            }));
        if (!this.defaultNavigationTools ||
            !this.defaultNavigationTools.vertical ||
            this.defaultNavigationTools.vertical.walk)
            items.push(ToolbarItems.createWalkView({
                itemPriority: 10,
                layouts: vertical,
            }));
        if (!this.defaultNavigationTools ||
            !this.defaultNavigationTools.vertical ||
            this.defaultNavigationTools.vertical.toggleCamera)
            items.push(ToolbarItems.createToggleCameraView({
                itemPriority: 20,
                layouts: vertical,
            }));
        return items;
    }
}
//# sourceMappingURL=StandardNavigationToolsUiItemsProvider.js.map