import type Accessor from "../../core/Accessor.js";
import type NavigationActionMap from "./NavigationActionMap.js";
import type GamepadSettings from "./gamepad/GamepadSettings.js";
import type { NavigationActionMapProperties } from "./NavigationActionMap.js";

export interface NavigationProperties extends Partial<Pick<Navigation, "browserTouchPanEnabled" | "momentumEnabled" | "mouseWheelZoomEnabled">> {
  /**
   * The navigation action map defines the default behavior of the navigation controls.
   *
   * @since 4.32
   * @example
   * // By default, dragging the middle mouse button (tertiary button) zooms the SceneView. By setting the tertiary
   * // drag action to "none", that default behavior can be disabled.
   * view.navigation.actionMap.dragTertiary = "none";
   */
  actionMap?: NavigationActionMapProperties;
}

/**
 * Navigation related configuration settings on the View.
 *
 * @since 4.9
 */
export default abstract class Navigation extends Accessor {
  /**
   * The navigation action map defines the default behavior of the navigation controls.
   *
   * @since 4.32
   * @example
   * // By default, dragging the middle mouse button (tertiary button) zooms the SceneView. By setting the tertiary
   * // drag action to "none", that default behavior can be disabled.
   * view.navigation.actionMap.dragTertiary = "none";
   */
  get actionMap(): NavigationActionMap;
  set actionMap(value: NavigationActionMapProperties);
  /**
   * Indicates if single finger touch [View#@drag](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#event-drag) events are enabled or disabled.
   * When `false`, the map cannot be panned with single finger touch gesture on touch devices. This will
   * allow web pages to scroll down without panning the map on touch devices. While single touch panning and zooming is disabled, the map can still be panned,
   * zoomed, and rotated (if unconstrained) with _two_ fingers. This property does not affect mouse-based dragging.
   *
   * @default true
   * @since 4.14
   * @example
   * // Disable single touch panning in a MapView.
   * const view = new MapView({
   *   container: "viewDiv",
   *   map: new Map({
   *     basemap: "streets-vector"
   *   })
   * });
   * view.navigation.browserTouchPanEnabled = false;
   */
  accessor browserTouchPanEnabled: boolean;
  /**
   * Gamepad navigation specific configuration settings.
   *
   * @since 4.9
   * @example
   * // Disable the gamepad usage in MapView
   * const view = new MapView({
   *   container: "viewDiv",
   *   map: new Map({
   *     basemap: "satellite"
   *   }),
   *   center: [176.185, -37.643],
   *   zoom: 13,
   *   navigation: {
   *     gamepad: {
   *       enabled: false
   *     }
   *   }
   * });
   *
   * // Disable gamepad usage in SceneView.
   * const view = new SceneView({
   *   container: "viewDiv",
   *   map: new Map({
   *     basemap: "satellite",
   *     ground: "world-elevation"
   *   }),
   *   camera: {
   *     position: [176.171, -37.660, 2000],
   *     heading: 0,
   *     tilt: 60
   *   },
   *   navigation: {
   *     gamepad: {
   *       enabled: false
   *     }
   *   }
   * });
   */
  get gamepad(): GamepadSettings;
  /**
   * When `true`, the view will temporarily continue to pan after the pointer (e.g. mouse, stylus, finger) has lifted.
   *
   * > [!CAUTION]
   * >
   * > With respect to [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html), this property will be ignored if [ConfigWithRespectPrefersReducedMotion](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#ConfigWithRespectPrefersReducedMotion)
   * > is `true` and the user has requested reduced motion. See [prefers-reduced-motion](https://developer.mozilla.org/docs/Web/CSS/@media/prefers-reduced-motion) for more information.
   *
   * @default true
   * @since 4.14
   * @example
   * // Disable pan animation in the MapView.
   * const view = new MapView({
   *   container: "viewDiv",
   *   map: new Map({
   *     basemap: "streets-vector"
   *   })
   * });
   * view.navigation.momentumEnabled = false;
   */
  accessor momentumEnabled: boolean;
  /**
   * Indicates whether the view can be zoomed in or out with the mouse wheel.
   * When a map occupies part the screen, page navigation may be difficult at times since
   * mouse wheel movement over the map can be interpreted as map zooming rather than
   * page scrolling. In some cases, setting `mouseWheelZoomEnabled` to `false` can make
   * scrollable webpages with maps easier to navigate.
   *
   * @deprecated since version 4.32. Use [actionMap.mouseWheel](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-navigation-NavigationActionMap.html#mouseWheel) instead.
   * @default true
   * @since 4.14
   * @example
   * // To disable mouse wheel zooming in a MapView.
   * const view = new MapView({
   *   container: "viewDiv",
   *   map: new Map({
   *     basemap: "streets-vector"
   *   })
   * });
   * view.navigation.mouseWheelZoomEnabled = false;
   */
  accessor mouseWheelZoomEnabled: boolean;
}