export type Vec3 = [number, number, number];

export type SystemPlanet = {
  id: string;
  name: string;
  type: string;
  orbit: number;
  moons: number;
};

export type SystemPointOfInterest = {
  id: string;
  name: string;
  type: "station" | "asteroid_belt" | "anomaly" | "stargate" | "site";
  description: string;
};

export type GalaxySystem = {
  id: string;
  name: string;
  security: number;
  x: number;
  y: number;
  z: number;
  mapProjection?: "backend2d" | "world3d";
  faction?: string;
  type: string;
  planetCount: number;
  planets: SystemPlanet[];
  stations: string[];
  pointsOfInterest: SystemPointOfInterest[];
  color: string;
};

export type GalaxyConnection = [string, string];

export type RouteSegment = {
  from: GalaxySystem;
  to: GalaxySystem;
  distance: number;
};

export type NavigationRoute = {
  origin: GalaxySystem;
  destination: GalaxySystem;
  systems: GalaxySystem[];
  segments: RouteSegment[];
  totalDistance: number;
};

export type PoiNavigationStatus = "approaching" | "arrived";

export type PoiNavigationTarget = {
  systemId: string;
  poiId: string;
  poiName: string;
  status: PoiNavigationStatus;
};

export type ShipTransform = {
  position: Vec3;
  rotation: Vec3;
};

export type CombatLockState = "idle" | "locking" | "locked";

export type CombatDogfightState = {
  lockState: CombatLockState;
  playerOrbitAngle: number;
  enemyOrbitAngle: number;
  playerPosition: Vec3;
  enemyPosition: Vec3;
};
