import type { Vector3Dto } from "./contractsCommon";

export interface StarSnapshot {
  kind: string;
  color: string;
  glow: string;
  size: number;
  orbitRadius: number;
  orbitSpeed: number;
  orbitPhaseAtEpoch: number;
}

export interface MoonSnapshot {
  label: string;
  size: number;
  color: string;
  orbitRadius: number;
  orbitSpeed: number;
  orbitPhaseAtEpoch: number;
  orbitInclination: number;
  orbitLongitudeOfAscendingNode: number;
}

export interface SystemSnapshot {
  id: string;
  label: string;
  galaxyPosition: Vector3Dto;
  stars: StarSnapshot[];
  planets: PlanetSnapshot[];
}

export interface PlanetSnapshot {
  label: string;
  planetType: string;
  shape: string;
  moons: MoonSnapshot[];
  orbitRadius: number;
  orbitSpeed: number;
  orbitEccentricity: number;
  orbitInclination: number;
  orbitLongitudeOfAscendingNode: number;
  orbitArgumentOfPeriapsis: number;
  orbitPhaseAtEpoch: number;
  size: number;
  color: string;
  hasRing: boolean;
}

export interface ResourceNodeSnapshot {
  id: string;
  systemId: string;
  localPosition: Vector3Dto;
  celestialId?: string | null;
  sourceKind: string;
  oreRemaining: number;
  maxOre: number;
  itemId: string;
}

export interface ResourceNodeDelta extends ResourceNodeSnapshot {}

export interface CelestialSnapshot {
  id: string;
  systemId: string;
  kind: string;
  orbitalAnchor: Vector3Dto;
  localSpaceRadius: number;
  parentNodeId?: string | null;
  occupyingStructureId?: string | null;
  orbitReferenceId?: string | null;
}

export interface CelestialDelta extends CelestialSnapshot {}
