import type Extent from "../../geometry/Extent.js";
import type Point from "../../geometry/Point.js";
import type Polygon from "../../geometry/Polygon.js";
import type BaseImageMeasureParameters from "./BaseImageMeasureParameters.js";
import type { BaseImageMeasureParametersProperties } from "./BaseImageMeasureParameters.js";
import type { PolygonProperties } from "../../geometry/Polygon.js";
import type { ExtentProperties } from "../../geometry/Extent.js";
import type { PointProperties } from "../../geometry/Point.js";

export interface ImagePointParametersProperties extends BaseImageMeasureParametersProperties, Partial<Pick<ImagePointParameters, "is3D">> {
  /** Input geometry to determine a point location or a centroid of a given area. */
  geometry?: (PointProperties & { type: "point" }) | (ExtentProperties & { type: "extent" }) | (PolygonProperties & { type: "polygon" });
}

/**
 * Input parameters used by the [ImageryLayer.measurePointOrCentroid()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#measurePointOrCentroid)
 * or [measurePointOrCentroid()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-imageService.html#measurePointOrCentroid) methods to perform imagery
 * point or centroid mensuration.
 * The point mensuration determines the location of point-based geographic coordinates while the centroid mensuration
 * determines the centroid of the area of interest for given geometry.
 *
 * @since 4.26
 * @see [ImageryLayer.measurePointOrCentroid()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#measurePointOrCentroid)
 * @see [measurePointOrCentroid()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-imageService.html#measurePointOrCentroid)
 * @see [ImagePointResult](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ImagePointResult.html)
 */
export default class ImagePointParameters extends BaseImageMeasureParameters {
  constructor(properties?: ImagePointParametersProperties);
  /** Input geometry to determine a point location or a centroid of a given area. */
  get geometry(): Point | Extent | Polygon;
  set geometry(value: (PointProperties & { type: "point" }) | (ExtentProperties & { type: "extent" }) | (PolygonProperties & { type: "polygon" }));
  /**
   * When `true`, this method calculates the z-value for the returned point geometry.
   * 3D calculation can only be done when the layer's [capabilities.mensuration.supports3D](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#capabilities) returns `true`.
   *
   * @default false
   */
  accessor is3D: boolean;
  /** The string value representing the type of imagery mensuration. */
  readonly type: "point";
}