import type { JSONSupport, JSONSupportMixinProperties } from "../core/JSONSupport.js";
import type { APIUnitString } from "../core/units.js";

export interface HeightModelInfoProperties extends JSONSupportMixinProperties {
  /**
   * The surface type or height model of the vertical coordinate system (VCS). A
   * [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) will only render layers containing data that
   * is compatible with the HeightModelInfo of the scene.
   *
   * Value | Description
   * ------|------------
   * gravity-related-height | A gravity-related VCS may set its zero point through a local mean sea level or a benchmark, and is compatible with other gravity-related VCS for the purposes of rendering.
   * ellipsoidal | An ellipsoidal VCS defines heights that are referenced to an ellipsoid of a geographic coordinate system.
   *
   * @default "gravity-related-height"
   */
  heightModel?: HeightModel;
  /**
   * The unit of the vertical coordinate system. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html)
   * will use this property to check that the vertical data of layers that
   * define a HeightModelInfo is compatible with the view.
   *
   * @default "meters"
   */
  heightUnit?: APIUnitString;
  /**
   * The datum realization of the vertical coordinate system. A
   * [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) will only render layers that define a
   * HeightModelInfo with an identical `vertCRS` to that of the scene,
   * when using an `ellipsoidal` height model.
   */
  vertCRS?: string | null;
}

export type HeightModel = "gravity-related-height" | "ellipsoidal";

/**
 * The height model info defines the characteristics of a vertical coordinate system.
 * In a [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html), the height model info of a
 * [WebScene#heightModelInfo](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebScene.html#heightModelInfo) is used to avoid rendering layers
 * that have incompatible vertical coordinate systems.
 * A height model info object is defined by a [surface type](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-HeightModelInfo.html#heightModel), a [vertical unit](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-HeightModelInfo.html#heightUnit), and an
 * [optional datum realization](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-HeightModelInfo.html#vertCRS).
 *
 * @since 4.5
 * @see [Vertical coordinate systems](https://developers.arcgis.com/rest/services-reference/enterprise/using-spatial-references.htm)
 */
export default class HeightModelInfo extends JSONSupport {
  constructor(properties?: HeightModelInfoProperties);
  /**
   * The surface type or height model of the vertical coordinate system (VCS). A
   * [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) will only render layers containing data that
   * is compatible with the HeightModelInfo of the scene.
   *
   * Value | Description
   * ------|------------
   * gravity-related-height | A gravity-related VCS may set its zero point through a local mean sea level or a benchmark, and is compatible with other gravity-related VCS for the purposes of rendering.
   * ellipsoidal | An ellipsoidal VCS defines heights that are referenced to an ellipsoid of a geographic coordinate system.
   *
   * @default "gravity-related-height"
   */
  get heightModel(): HeightModel;
  /**
   * The unit of the vertical coordinate system. A [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html)
   * will use this property to check that the vertical data of layers that
   * define a HeightModelInfo is compatible with the view.
   *
   * @default "meters"
   */
  get heightUnit(): APIUnitString;
  /**
   * The datum realization of the vertical coordinate system. A
   * [SceneView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) will only render layers that define a
   * HeightModelInfo with an identical `vertCRS` to that of the scene,
   * when using an `ellipsoidal` height model.
   */
  get vertCRS(): string | null | undefined;
}