import type { ZoneId } from "../../zone/model/meta";

export type VesselTypeCode = "PT" | "PT-S" | "GN" | "OT" | "PS" | "FC";

export interface Vessel {
  id: number;
  permit: string;
  code: VesselTypeCode;

  color: string;

  lat: number;
  lon: number;
  speed: number;
  course: number;
  state: string;

  zone: ZoneId;
  isFishing: boolean;

  owner: string;
  region: string;

  pairId: number | null;
  pairDistNm: number | null;

  nearVesselIds: number[];
}

export interface TrawlPair {
  mainId: number;
  subId: number;
  owner: string;
  region: string;
}

export interface FleetOwner {
  name: string;
  region: string;
  vessels: number[]; // vessel ids
  type: "trawl" | "gn" | "ot" | "ps";
}

export interface FleetState {
  vessels: Vessel[];
  owners: FleetOwner[];
  ptPairs: TrawlPair[];
}
