import type Extent from "./Extent.js";
import type Mesh from "./Mesh.js";
import type Multipoint from "./Multipoint.js";
import type Point from "./Point.js";
import type Polygon from "./Polygon.js";
import type Polyline from "./Polyline.js";
import type MeshGeoreferencedVertexSpace from "./support/MeshGeoreferencedVertexSpace.js";
import type MeshLocalVertexSpace from "./support/MeshLocalVertexSpace.js";

/** @since 5.0 */
export type FeatureGeometryType = "point" | "multipoint" | "polyline" | "polygon";

/** @since 5.0 */
export type GeometryType = "point" | "multipoint" | "polyline" | "polygon" | "extent" | "mesh";

/**
 * Union of all geometries.
 *
 * @since 5.0
 */
export type GeometryUnion = Extent | Multipoint | Point | Polygon | Polyline | Mesh;

/**
 * Union of all non-mesh geometries.
 *
 * @since 5.0
 */
export type GeometryWithoutMeshUnion = Extent | Multipoint | Point | Polygon | Polyline;

/** @since 5.0 */
export type CurveType = "circular-arc" | "elliptic-arc" | "cubic-bezier";

/** @since 5.0 */
export type GeodeticCurveType = "geodesic" | "loxodrome" | "great-elliptic" | "normal-section" | "shape-preserving";

/** @since 5.0 */
export type LatitudeLongitudeFormat = "dd" | "ddm" | "dms";

/**
 * The definition of compressed texture data.
 *
 * @since 5.0
 */
export interface CompressedTextureData {
  /**
   * The compressed texture data.
   *
   * @since 5.0
   */
  data: Uint8Array<ArrayBuffer>;
  /**
   * The texture encoding.
   *
   * @since 5.0
   */
  encoding: "image/ktx2";
  /**
   * The type.
   *
   * @since 5.0
   */
  type: "encoded-mesh-texture";
}

/** @since 5.0 */
export type MeshTextureData = HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageData | CompressedTextureData;

/** @since 5.0 */
export type MeshVertexSpaceUnion = MeshGeoreferencedVertexSpace | MeshLocalVertexSpace;