import type Graphic from "../../Graphic.js";
import type { EventedAccessor } from "../../core/Evented.js";
import type { MapViewOrSceneView } from "../../views/MapViewOrSceneView.js";
import type { GoTo, GoToProperties } from "./GoTo.js";
import type { GraphicProperties } from "../../Graphic.js";

export interface GeolocationPositioningProperties extends GoToProperties, Partial<Pick<GeolocationPositioning, "geolocationOptions" | "goToLocationEnabled" | "scale" | "view">> {
  /**
   * The graphic used to show the user's location on the map.
   *
   * @example
   * const trackWidget = new Track({
   *   // Assign the track widget to a view
   *   view: view,
   *   // Overwrite the default symbol used for the
   *   // graphic placed at the location of the user
   *   graphic: new Graphic ({
   *    symbol: {
   *      // autocasts as new SimpleMarkerSymbol()
   *      type: "simple-marker",
   *      size: "12px",
   *      color: "blue",
   *      // autocasts as new SimpleLineSymbol()
   *      outline: {
   *        color: "#efefef",
   *        width: "1.5px"
   *      }
   *    }
   *  })
   * });
   */
  graphic?: GraphicProperties;
}

/**
 * Provides common logic for [LocateViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Locate-LocateViewModel.html)
 * and [TrackViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Track-TrackViewModel.html).
 *
 * @since 4.0
 */
export default class GeolocationPositioning extends GeolocationPositioningSuperclass {
  constructor(properties?: GeolocationPositioningProperties);
  /**
   * An object used for setting optional position parameters. Refer to the
   * [Geolocation API Specification](https://www.w3.org/TR/geolocation/#position_options_interface)
   * for details on using these parameters.
   *
   * @example
   * const track = new Track({
   *   view: view,
   *   // Set optional position parameters
   *   geolocationOptions: {
   *     maximumAge: 0,
   *     timeout: 15000,
   *     enableHighAccuracy: true
   *   }
   * });
   */
  accessor geolocationOptions: PositionOptions | null | undefined;
  /**
   * Indicates whether to navigate the view to the position and scale of the geolocated result.
   *
   * @default true
   */
  accessor goToLocationEnabled: boolean;
  /**
   * The graphic used to show the user's location on the map.
   *
   * @example
   * const trackWidget = new Track({
   *   // Assign the track widget to a view
   *   view: view,
   *   // Overwrite the default symbol used for the
   *   // graphic placed at the location of the user
   *   graphic: new Graphic ({
   *    symbol: {
   *      // autocasts as new SimpleMarkerSymbol()
   *      type: "simple-marker",
   *      size: "12px",
   *      color: "blue",
   *      // autocasts as new SimpleLineSymbol()
   *      outline: {
   *        color: "#efefef",
   *        width: "1.5px"
   *      }
   *    }
   *  })
   * });
   */
  get graphic(): Graphic;
  set graphic(value: GraphicProperties);
  /**
   * Indicates the scale to set on the view when navigating to the position of the geolocated
   * result, after a location is returned.
   *
   * By default, the view will navigate to a scale of `2500` for 3D and `4514` for 2D.
   * To override the default in 2D, set the `scale` property and also set [snapToZoom](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints) to `false`.
   * For 2D views the value should be within the [effectiveMinScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints)
   * and [effectiveMaxScale](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints).
   *
   * @since 4.7
   */
  accessor scale: number | null | undefined;
  /** The view associated with the widget. */
  accessor view: MapViewOrSceneView | null | undefined;
}
declare const GeolocationPositioningSuperclass: typeof EventedAccessor & typeof GoTo