import type SpatialReference from "../../geometry/SpatialReference.js";
import type { JSONSupport } from "../../core/JSONSupport.js";
import type { SpatialReferenceProperties } from "../../geometry/SpatialReference.js";

export interface ImageAngleResultProperties extends Partial<Pick<ImageAngleResult, "north" | "up">> {
  /** The spatial reference used to compute the angles. */
  spatialReference?: SpatialReferenceProperties | null;
}

/**
 * The results from [computeAngles()](https://developers.arcgis.com/javascript/latest/references/core/rest/imageService/#computeAngles) or
 * [ImageryLayer.computeAngles()](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/#computeAngles) method.
 *
 * @since 4.22
 * @see [ImageryLayer.computeAngles()](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/#computeAngles)
 * @see [computeAngles()](https://developers.arcgis.com/javascript/latest/references/core/rest/imageService/#computeAngles)
 * @see [ImageAngleParameters](https://developers.arcgis.com/javascript/latest/references/core/rest/support/ImageAngleParameters/)
 */
export default class ImageAngleResult extends JSONSupport {
  constructor(properties?: ImageAngleResultProperties);
  /**
   * The computed north angle after rotating the map so the top of the image is oriented toward north.
   * It is arithmetic rotation between image coordinate system and pixel space.
   */
  accessor north: number | null | undefined;
  /** The spatial reference used to compute the angles. */
  get spatialReference(): SpatialReference | null | undefined;
  set spatialReference(value: SpatialReferenceProperties | null | undefined);
  /**
   * The computed up angle after rotating the map so the top of the image is always oriented to the direction of the sensor when it acquired the image.
   * Top up works similarly to an in-car navigation system where the choices are often either north is at the top of the screen (therefore, not using a top up option)
   * or the screen rotates so the travel direction is always displayed at the top.
   */
  accessor up: number | null | undefined;
}