import type { TguPlanStatus } from "../../../model/tguTypes";

export type GeoPoint = {
  lon: number;
  lat: number;
};

export type ScreenPoint = {
  x: number;
  y: number;
};

export type MapSize = {
  width: number;
  height: number;
};

export type MapViewState = {
  centerLon: number;
  centerLat: number;
  zoom: number;
};

export type MapPolygon = {
  id: string;
  name: string;
  kind: "planWork" | "swath" | "trackZone" | "request";
  layer: "planWorks" | "swath" | "tracks" | "requests";
  points: GeoPoint[];
  status?: TguPlanStatus;
  planId?: string;
  spacecraftId?: string;
  requestId?: string;
  surveyType?: string;
  zIndex: number;
};

export type MapLine = {
  id: string;
  layer: "tracks";
  points: GeoPoint[];
  spacecraftId?: string;
  passIndex?: number;
  zIndex: number;
};

export type MapMarker = {
  id: string;
  layer: "stations" | "spacecraftMarkers";
  point: GeoPoint;
  label: string;
  zIndex: number;
};

export type Tgu2DMapScene = {
  polygons: MapPolygon[];
  lines: MapLine[];
  markers: MapMarker[];
};

