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

export interface CornersGeoreferenceProperties {
  /**
   * The bottom left [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) of the bounding box representing the geographic location of the image or video element being added
   * to the [MediaLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MediaLayer.html).
   *
   * @see [ImageElement#georeference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ImageElement.html#georeference)
   * @see [VideoElement#georeference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-VideoElement.html#georeference)
   */
  bottomLeft?: PointProperties | null;
  /**
   * The bottom right [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) of the bounding box representing the geographic location of the image or video element being added
   * to the [MediaLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MediaLayer.html).
   *
   * @see [ImageElement#georeference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ImageElement.html#georeference)
   * @see [VideoElement#georeference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-VideoElement.html#georeference)
   */
  bottomRight?: PointProperties | null;
  /**
   * The top left [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) of the bounding box representing the geographic location of the image or video element being added
   * to the [MediaLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MediaLayer.html).
   *
   * @see [ImageElement#georeference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ImageElement.html#georeference)
   * @see [VideoElement#georeference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-VideoElement.html#georeference)
   */
  topLeft?: PointProperties | null;
  /**
   * The top right [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) of the bounding box representing the geographic location of the image or video element being added
   * to the [MediaLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MediaLayer.html).
   *
   * @see [ImageElement#georeference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ImageElement.html#georeference)
   * @see [VideoElement#georeference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-VideoElement.html#georeference)
   */
  topRight?: PointProperties | null;
}

/**
 * CornersGeoreference is used to set the [geographic location](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ImageElement.html#georeference) of the
 * [image](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ImageElement.html) or [element](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-VideoElement.html) referenced
 * in the [MediaLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MediaLayer.html) using corner points of a bounding box.
 *
 * ```js
 * // create a canvas image element by setting its corner points of the bounding box
 * const canvasElement = new ImageElement({
 *   image: canvas,
 *   georeference: new CornersGeoreference({
 *     bottomRight: new Point({
 *       x: -121.369,
 *       y: 45.061,
 *       spatialReference: {
 *         wkid: 4326
 *       }
 *     }),
 *     bottomLeft: new Point({
 *       x: -122.363,
 *       y: 45.061,
 *       spatialReference: {
 *         wkid: 4326
 *       }
 *     }),
 *     topRight: new Point({
 *       x: -121.369,
 *       y: 45.678,
 *       spatialReference: {
 *         wkid: 4326
 *       }
 *     }),
 *     topLeft: new Point({
 *       x: -122.363,
 *       y: 45.678,
 *       spatialReference: {
 *         wkid: 4326
 *       }
 *     })
 *   })
 * });
 * ```
 *
 * @since 4.24
 * @see [ImageElement#georeference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ImageElement.html#georeference)
 * @see [VideoElement#georeference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-VideoElement.html#georeference)
 * @see [Sample - MediaLayer with video](https://developers.arcgis.com/javascript/latest/sample-code/layers-medialayer-video/)
 */
export default class CornersGeoreference extends GeoreferenceBase {
  constructor(properties?: CornersGeoreferenceProperties);
  /**
   * The bottom left [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) of the bounding box representing the geographic location of the image or video element being added
   * to the [MediaLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MediaLayer.html).
   *
   * @see [ImageElement#georeference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ImageElement.html#georeference)
   * @see [VideoElement#georeference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-VideoElement.html#georeference)
   */
  get bottomLeft(): Point | null | undefined;
  set bottomLeft(value: PointProperties | null | undefined);
  /**
   * The bottom right [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) of the bounding box representing the geographic location of the image or video element being added
   * to the [MediaLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MediaLayer.html).
   *
   * @see [ImageElement#georeference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ImageElement.html#georeference)
   * @see [VideoElement#georeference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-VideoElement.html#georeference)
   */
  get bottomRight(): Point | null | undefined;
  set bottomRight(value: PointProperties | null | undefined);
  /**
   * The top left [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) of the bounding box representing the geographic location of the image or video element being added
   * to the [MediaLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MediaLayer.html).
   *
   * @see [ImageElement#georeference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ImageElement.html#georeference)
   * @see [VideoElement#georeference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-VideoElement.html#georeference)
   */
  get topLeft(): Point | null | undefined;
  set topLeft(value: PointProperties | null | undefined);
  /**
   * The top right [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) of the bounding box representing the geographic location of the image or video element being added
   * to the [MediaLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MediaLayer.html).
   *
   * @see [ImageElement#georeference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-ImageElement.html#georeference)
   * @see [VideoElement#georeference](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-VideoElement.html#georeference)
   */
  get topRight(): Point | null | undefined;
  set topRight(value: PointProperties | null | undefined);
  /** The georeference type. */
  readonly type: "corners";
}