import type { TguPlan, TguPlanStatus, TguPlatform } from "./tguTypes";

export type TguPlatformUi = {
  spacecraftId: string;
  name?: string;
  noradId?: string;
  status?: string;
  mission?: string;
  planCount: number;
  hasProblemStatus: boolean;
  platform?: TguPlatform;
};

export type TguPlanUi = TguPlan & {
  startMs: number;
  endMs: number;
  platform?: TguPlatformUi;
};

export type TimelineRange = {
  fromMs: number;
  toMs: number;
};

export type TguActiveTab = "timeline" | "map" | "editor";

export type TimelineRow = {
  spacecraftId: string;
  platform?: TguPlatformUi;
  plans: TguPlanUi[];
};

export type TimelinePlanSegment = {
  plan: TguPlanUi;
  rowIndex: number;
  laneOffset: number;
  x: number;
  x2: number;
  width: number;
};

export type TimelineLink = {
  spacecraftId: string;
  fromPlanId: string;
  toPlanId: string;
};

export type TimelineStatusStyle = {
  status: TguPlanStatus;
  label: string;
  color: string;
  className: string;
};
