import type BaseGeometry from "./Geometry.js";
import type Point from "./Point.js";
import type { GeometryProperties as BaseGeometryProperties } from "./Geometry.js";

export interface MultipointProperties extends BaseGeometryProperties, Partial<Pick<Multipoint, "points">> {}

/**
 * An ordered collection of points.
 *
 * > [!WARNING]
 * >
 * > **Known Limitations**
 * >
 * > There is currently no support for rendering multipoint geometries in scenes (3D).
 *
 * @since 4.0
 * @see [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html)
 */
export default class Multipoint extends BaseGeometry {
  constructor(properties?: MultipointProperties);
  /** An array of points. */
  accessor points: number[][];
  /** The string value representing the type of geometry. */
  get type(): "multipoint";
  /**
   * Adds a point to the Multipoint.
   *
   * @param point - The point to add to the multipoint. The point can either be a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html) or
   *                                            an array of numbers representing XY coordinates.
   * @returns Returns the updated Multipoint.
   */
  addPoint(point: Point | number[]): this;
  /**
   * Creates a deep clone of the Multipoint object.
   *
   * @returns A new instance of a Multipoint object equal to the object used to call `.clone()`.
   */
  clone(): Multipoint;
  /**
   * Returns the point at the specified index.
   *
   * @param index - The index of the point in the [points](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html#points) property.
   * @returns The point at the specified index.
   */
  getPoint(index: number): Point | null | undefined;
  /**
   * Removes a point from the Multipoint. The index specifies which point to remove.
   *
   * @param index - The index of the point to remove.
   * @returns Returns the removed point.
   */
  removePoint(index: number): Point | null | undefined;
  /**
   * Updates the point at the specified index.
   *
   * @param index - The index of the point in the [points](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Multipoint.html#points) property.
   * @param point - Point geometry that specifies the new location.
   * @returns Returns the updated Multipoint.
   */
  setPoint(index: number, point: Point | number[]): this;
}