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">> {
  /**
   * 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 class Navigation extends Accessor {
  constructor(properties?: NavigationProperties);
  /**
   * 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/references/core/views/View/#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/references/core/views/MapView/), this property will be ignored if [Config](https://developers.arcgis.com/javascript/latest/references/core/config/#Config-respectPrefersReducedMotion)
   * > 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;
}