import type Accessor from "../core/Accessor.js";
import type Collection from "../core/Collection.js";
import type Extent from "../geometry/Extent.js";
import type ElevationSampler from "../layers/support/ElevationSampler.js";
import type LayerView from "./layers/LayerView.js";

export interface GroundViewProperties {}

/**
 * This class represents the view for the [Ground](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html) of a map. It can be used to
 * [sample elevation](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-GroundView.html#elevationSampler) from the terrain surface that is currently visible in the view or to access the
 * [LayerViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) of the [Ground#layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#layers) in the ground.
 * An instance of this class can be accessed through [SceneView#groundView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#groundView).
 *
 * @since 4.7
 * @see [SceneView#groundView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#groundView)
 * @see [ElevationLayer#createElevationSampler()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#createElevationSampler)
 * @see [ElevationSampler](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ElevationSampler.html)
 */
export default class GroundView extends Accessor {
  constructor(properties?: GroundViewProperties);
  /**
   * An elevation sampler that may be used to sample and query elevation values from the ground surface that is
   * currently being displayed.
   *
   * The elevation sampler is not supported for [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) and may be `null` while the
   * ground surface display is being initialized.
   *
   * The resolution of the sampled values depends on the ground elevation display resolution (high resolution close to
   * the camera, low resolution far away from the camera). Because of the dynamic nature of the display resolution, the
   * [ElevationSampler#demResolution](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ElevationSampler.html#demResolution) property of the returned sampler
   * is not fixed and will change based on the data loaded by the view.
   *
   * If higher or more consistent sample resolution is required, then consider creating a sampler at the desired
   * resolution using
   * [ElevationLayer#createElevationSampler()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ElevationLayer.html#createElevationSampler) or
   * [Ground#createElevationSampler()](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#createElevationSampler).
   *
   * @example
   * let elevationSampler = view.groundView.elevationSampler;
   * // watch for changes in the elevationSampler
   * elevationSampler.on('changed', function() {
   *   // get z-values from the elevation displayed in the view
   *   let zEnrichedGeometry = elevationSampler.queryElevation(geometry);
   * });
   */
  get elevationSampler(): ElevationSampler | null;
  /**
   * The extent represents the visible portion of ground within the view as
   * an instance of [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html). The ground view extent is computed based
   * on the ground surface elevation at the center of the view, while the
   * [SceneView extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#extent) is computed at the elevation of
   * all of the scene content at the center of the view. The ground view extent may be more
   * appropriate when synchronizing the viewpoint of a [MapView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html) and a
   * [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html).
   *
   * @since 4.28
   */
  get extent(): Extent | null | undefined;
  /**
   * A collection containing a hierarchical list of all the created
   * [LayerViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) of the
   * [Ground#layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-Ground.html#layers) in the ground.
   *
   * @see [LayerView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html)
   */
  get layerViews(): Collection<LayerView>;
  /**
   * Value is `true` when any of the ground layer views are updating.
   *
   * @default false
   */
  get updating(): boolean;
}