import type Point from "../../geometry/Point.js";
import type BaseImageMeasureResult from "./BaseImageMeasureResult.js";
import type { PointProperties } from "../../geometry/Point.js";
import type { BaseImageMeasureResultProperties } from "./BaseImageMeasureResult.js";

export interface ImagePointResultProperties extends BaseImageMeasureResultProperties {
  /**
   * The measured point on an image service. It can represent a centroid of an area when [Polygon](https://developers.arcgis.com/javascript/latest/references/core/geometry/Polygon/) or [Extent](https://developers.arcgis.com/javascript/latest/references/core/geometry/Extent/)
   * geometry is used in [ImagePointParameters.geometry](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ImagePointParameters/#geometry) property.
   */
  point?: PointProperties;
}

/**
 * Image service point or centroid measurement result returned when the [ImageryLayer.measurePointOrCentroid()](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/#measurePointOrCentroid)
 * or [measurePointOrCentroid()](https://developers.arcgis.com/javascript/latest/references/core/rest/imageService/#measurePointOrCentroid) methods resolve successfully.
 *
 * @since 4.26
 * @see [ImageryLayer.measurePointOrCentroid()](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/#measurePointOrCentroid)
 * @see [measurePointOrCentroid()](https://developers.arcgis.com/javascript/latest/references/core/rest/imageService/#measurePointOrCentroid)
 * @see [ImagePointParameters](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ImagePointParameters/)
 */
export default class ImagePointResult extends BaseImageMeasureResult {
  constructor(properties?: ImagePointResultProperties);
  /**
   * The measured point on an image service. It can represent a centroid of an area when [Polygon](https://developers.arcgis.com/javascript/latest/references/core/geometry/Polygon/) or [Extent](https://developers.arcgis.com/javascript/latest/references/core/geometry/Extent/)
   * geometry is used in [ImagePointParameters.geometry](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ImagePointParameters/#geometry) property.
   */
  get point(): Point;
  set point(value: PointProperties);
}