import type { AisTarget } from '../../../entities/aisTarget/model/types';

export const SIGNAL_SOURCE_AIS = '000001';

export const SIGNAL_KIND = {
  FISHING: '000020',
  KCGV: '000021',
  PASSENGER: '000022',
  CARGO: '000023',
  TANKER: '000024',
  GOV: '000025',
  NORMAL: '000027',
  BUOY: '000028',
} as const;

export type SignalKindCode = (typeof SIGNAL_KIND)[keyof typeof SIGNAL_KIND] | string;

export interface LiveShipFeature {
  mmsi: number;
  featureId: string;
  targetId: string;
  originalTargetId: string;
  signalSourceCode: string;
  signalKindCode: SignalKindCode;
  shipName: string;
  longitude: number;
  latitude: number;
  sog: number;
  cog: number;
  heading: number;
  messageTimestamp: string;
  nationalCode: string;
  vesselType?: string;
  raw?: AisTarget;
}

export interface ViewportBounds {
  minLon: number;
  maxLon: number;
  minLat: number;
  maxLat: number;
}
