export const UnitCodeToInt: Record<string, number> = {
  H: -1,
  S: 0,
  "1": 1,
  "2": 2,
  "3": 3,
  "4": 4,
};

export const UnitNumberToCode: Record<string | number, string> = {
  "-1": "H",
  0: "S",
  1: "1",
  2: "2",
  3: "3",
  4: "4",
};

export const UnitTypeToCode: Record<string, string | number> = {
  Hotel: "H",
  Studio: "S",
  "1 Bedroom": 1,
  "2 Bedroom": 2,
  "3 Bedroom": 3,
  "4 Bedroom": 4,
};

export const UnitCodeToType: Record<string, string> = {
  H: "Hotel",
  S: "Studio",
  "1": "1 Bedroom",
  "2": "2 Bedroom",
  "3": "3 Bedroom",
  "4": "4 Bedroom",
};

export const getViewpointExternalUnitTypeID = (unit_type: string | number) => {
  switch (unit_type) {
    case "H":
      return "1";
    case "S":
      return "1";
    case 1:
      return "3";
    case 2:
      return "5";
    case 3:
      return "8";
    case 4:
      return "9";
    default:
      return "1";
  }
};
