import type Polyline from "../../geometry/Polyline.js";
import type { JSONSupport, JSONSupportMixinProperties } from "../../core/JSONSupport.js";
import type { PolylineProperties } from "../../geometry/Polyline.js";

export interface MeasureLengthFromImageResultProperties extends JSONSupportMixinProperties, Partial<Pick<MeasureLengthFromImageResult, "length">> {
  /** Polyline geometry in a map space. */
  geometry?: (PolylineProperties & { type: "polyline" });
}

/**
 * The length result from a selected image's measurement in an image space when the [ImageryLayer#measureLengthFromImage()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#measureLengthFromImage)
 * or [measureLengthFromImage()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-imageService.html#measureLengthFromImage) methods resolve successfully.
 *
 * @since 4.29
 * @see [ImageryLayer#measureLengthFromImage()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#measureLengthFromImage)
 * @see [measureLengthFromImage()](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-imageService.html#measureLengthFromImage)
 * @see [MeasureFromImageParameters](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-MeasureFromImageParameters.html)
 */
export default class MeasureLengthFromImageResult extends JSONSupport {
  constructor(properties?: MeasureLengthFromImageResultProperties);
  /** Polyline geometry in a map space. */
  get geometry(): Polyline;
  set geometry(value: (PolylineProperties & { type: "polyline" }));
  /** The length of a polyline in meters. */
  accessor length: number;
}