/*---------------------------------------------------------------------------------------------
* 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
 */
import * as React from "react";
import { CoreTools } from "../tools/CoreToolDefinitions";
import { connectIModelConnection } from "../redux/connectIModel";
import { ItemList } from "../shared/ItemMap";
import { UiFramework } from "../UiFramework";
import { NavigationWidget } from "./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
 */
export class DefaultNavigationWidget extends React.Component {
    constructor() {
        super(...arguments);
        this._horizontalToolbarItems = new ItemList([
            CoreTools.rotateViewCommand,
            CoreTools.panViewCommand,
            CoreTools.fitViewCommand,
            CoreTools.windowAreaCommand,
            CoreTools.viewUndoCommand,
            CoreTools.viewRedoCommand,
        ]);
        this._verticalToolbarItems = new ItemList([
            CoreTools.walkViewCommand,
            CoreTools.toggleCameraViewCommand,
        ]);
    }
    render() {
        const horizontalToolbarItems = new 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 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 // eslint-disable-line deprecation/deprecation
        , { navigationAidId: "CubeNavigationAid", iModelConnection: UiFramework.getIModelConnection(), horizontalItems: horizontalToolbarItems, verticalItems: verticalToolbarItems }));
    }
}
/** 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
 */
export const IModelConnectedNavigationWidget = connectIModelConnection(null, null)(DefaultNavigationWidget); // eslint-disable-line @typescript-eslint/naming-convention, deprecation/deprecation
//# sourceMappingURL=DefaultNavigationWidget.js.map