import type { ColorName } from '../color';
import type { GameType } from '../game';
import type { GameTrack } from '../gameTrack';
import type { KartShield } from './KartShield';
import type { KartStatus } from './KartStatus';

interface KartGame {
  id: number;
  type: GameType;
}

export interface Kart {
  /** Unique ID by kart */
  guid: string;
  /** kartGuid assigned by Game Track (multiple karts could have the same Id) */
  id: number;
  mac: string;
  isConnected: boolean;
  status: KartStatus;
  shield: KartShield;
  // If a Kart is not assigned to a game, the default gane track should be "TEST"
  gameTrackId: GameTrack['id'];
  color: ColorName;
  number: number;
  currentGame?: KartGame | null;
  description?: string | null;
  /**
   * In testing Mode, the kart should be listening to the hardware status
   */
  isSubscribedToHardwareStatus: boolean;
}
