export interface BacktrackVessel {
  rank: number;
  name: string;
  imo: string;
  type: string;
  flag: string;
  flagCountry: string;
  probability: number;
  closestTime: string;
  closestDistance: number;
  speedChange: string;
  aisStatus: string;
  description: string;
  color: string;
}

export interface BacktrackConditions {
  estimatedSpillTime: string;
  analysisRange: string;
  searchRadius: string;
  spillLocation: { lat: number; lon: number };
  totalVessels: number;
}

export interface ReplayPathPoint {
  lat: number;
  lon: number;
}

export interface ReplayShip {
  vesselName: string;
  color: string;
  path: ReplayPathPoint[];
  speedLabels: string[];
}

export interface CollisionEvent {
  position: { lat: number; lon: number };
  timeLabel: string;
  progressPercent: number;
}

export type BacktrackPhase = 'conditions' | 'analyzing' | 'results' | 'replay';

export const TOTAL_REPLAY_FRAMES = 120;

// 역추적 분석 실행 시 사용자가 입력하는 조건
export interface BacktrackInputConditions {
  estimatedSpillTime: string; // datetime-local input 값 (YYYY-MM-DDTHH:mm)
  analysisRange: string; // '6', '12', '24' (시간 단위)
  searchRadius: number; // NM 단위
}

// RSLT_DATA에 저장되는 분석 결과 타임 레인지
export interface BacktrackTimeRange {
  start: string; // ISO 문자열
  end: string; // ISO 문자열
}

// 역방향 예측 파티클 스텝 — 각 스텝은 [lon, lat] 쌍의 배열
export type BackwardParticleStep = [number, number][];
