"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 Widget
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.IModelConnectedNavigationWidget = exports.DefaultNavigationWidget = void 0;
const React = require("react");
const CoreToolDefinitions_1 = require("../tools/CoreToolDefinitions");
const connectIModel_1 = require("../redux/connectIModel");
const ItemMap_1 = require("../shared/ItemMap");
const UiFramework_1 = require("../UiFramework");
const NavigationWidget_1 = require("./NavigationWidget");
/** Default Navigation Widget for zone 3. Provides standard view manipulation tools and displays registered Navigation Aids as corner item.
 * This definition will also show a overflow button if there is not enough room to display all the toolbar buttons.
 * @beta
 * @deprecated in 3.6. Use [[BasicNavigationWidget]] instead
 */
class DefaultNavigationWidget extends React.Component {
    constructor() {
        super(...arguments);
        this._horizontalToolbarItems = new ItemMap_1.ItemList([
            CoreToolDefinitions_1.CoreTools.rotateViewCommand,
            CoreToolDefinitions_1.CoreTools.panViewCommand,
            CoreToolDefinitions_1.CoreTools.fitViewCommand,
            CoreToolDefinitions_1.CoreTools.windowAreaCommand,
            CoreToolDefinitions_1.CoreTools.viewUndoCommand,
            CoreToolDefinitions_1.CoreTools.viewRedoCommand,
        ]);
        this._verticalToolbarItems = new ItemMap_1.ItemList([
            CoreToolDefinitions_1.CoreTools.walkViewCommand,
            CoreToolDefinitions_1.CoreTools.toggleCameraViewCommand,
        ]);
    }
    render() {
        const horizontalToolbarItems = new ItemMap_1.ItemList();
        if (this.props.prefixHorizontalItems)
            horizontalToolbarItems.addItems(this.props.prefixHorizontalItems);
        // istanbul ignore else
        if (this._horizontalToolbarItems)
            horizontalToolbarItems.addItems(this._horizontalToolbarItems);
        if (this.props.suffixHorizontalItems)
            horizontalToolbarItems.addItems(this.props.suffixHorizontalItems);
        const verticalToolbarItems = new ItemMap_1.ItemList();
        if (this.props.prefixVerticalItems)
            verticalToolbarItems.addItems(this.props.prefixVerticalItems);
        // istanbul ignore else
        if (this._verticalToolbarItems)
            verticalToolbarItems.addItems(this._verticalToolbarItems);
        if (this.props.suffixVerticalItems)
            verticalToolbarItems.addItems(this.props.suffixVerticalItems);
        return (React.createElement(NavigationWidget_1.NavigationWidget // eslint-disable-line deprecation/deprecation
        , { navigationAidId: "CubeNavigationAid", iModelConnection: UiFramework_1.UiFramework.getIModelConnection(), horizontalItems: horizontalToolbarItems, verticalItems: verticalToolbarItems }));
    }
}
exports.DefaultNavigationWidget = DefaultNavigationWidget;
/** DefaultNavigationWidget that is connected to the IModelConnection property in the Redux store. The application must set up the Redux store and include the FrameworkReducer.
 * @beta
 * @deprecated in 3.6. Use [[BasicNavigationWidget]] instead
 */
exports.IModelConnectedNavigationWidget = (0, connectIModel_1.connectIModelConnection)(null, null)(DefaultNavigationWidget); // eslint-disable-line @typescript-eslint/naming-convention, deprecation/deprecation
//# sourceMappingURL=DefaultNavigationWidget.js.map