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";

export type FeatureGeometryType = "point" | "multipoint" | "polyline" | "polygon";

export type GeometryType = "point" | "multipoint" | "polyline" | "polygon" | "extent" | "mesh";

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

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

export type CurveType = "circular-arc" | "elliptic-arc" | "cubic-bezier";

export type GeodeticCurveType = "geodesic" | "loxodrome" | "great-elliptic" | "normal-section" | "shape-preserving";

export type LatitudeLongitudeFormat = "dd" | "ddm" | "dms";

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

export type MeshTextureData = HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageData | CompressedTextureData;

export type MeshVertexSpaceUnion = MeshGeoreferencedVertexSpace | MeshLocalVertexSpace;