interface WASMData {
  GSX: GSX;
  userData: UserData;
  options: Options;
  sbPlanned: {
    ZFW: number;
    GW: number;
  };
  loaded: boolean;
}

export interface WASMDataPax extends WASMData {
  livePayload: LivePayloadPax;
  targetPayload: TargetPayloadPax;
  limits: LimitsPax;
}

export interface WASMDataF extends WASMData {
  livePayload: LivePayloadF;
  targetPayload: TargetPayloadF;
  limits: LimitsF;
}

interface TargetPayload {
  CGTarget: number;
  ZFWCG: number;
  TOCG: number;
  total: number;
}

interface TargetPayloadPax extends TargetPayload {
  empty: number;
  crew: number;
  business1: number;
  business2: number;
  economy1: number;
  economy2: number;
  forwardCargo: number;
  rearCargo: number;
}

interface LivePayloadPax extends TargetPayloadPax {
  fuel: number;
}

interface TargetPayloadF extends TargetPayload {
  empty: number;
  crew: number;
  upper1: number;
  upper2: number;
  upper3: number;
  upper4: number;
  lowerForward: number;
  lowerRear: number;
}

interface LivePayloadF extends TargetPayloadF {
  fuel: number;
}

interface GSX {
  couatlStarted: boolean;
  loadingState: GSXLoadingState;
}

interface Limits {
  minCG: number;
  maxCG: number;
  maxFuel: number;
  maxTOW: number;
  maxZFW: number;
  minZFW: number;
}

interface LimitsPax extends Limits {
  business1: number;
  business2: number;
  economy1: number;
  economy2: number;
  forwardCargo: number;
  rearCargo: number;
}

interface LimitsF extends Limits {
  upper1: number;
  upper2: number;
  upper3: number;
  upper4: number;
  lowerForward: number;
  lowerRear: number;
}

interface UserData {
  isCargo: boolean;
  isER: boolean;
  isImperial: boolean;
}

interface Options {
  GSXSync: boolean;
  paxWeight: number;
  bagWeight: number;
}

export enum GSXLoadingState {
  IDLE = 0,
  BOARDING = 1,
  BOARDED = 2,
  DEBOARDING = 3,
  DEBOARDED = 4,
}
