export const BED_POSITIONS = ['UPPER', 'MIDDLE', 'LOWER'] as const;

export const COACH_TYPE_LABELS: Record<string, string> = {
  HSC: 'Regular Seat (Hard Seat)',
  HBC: 'Economy Bed (Hard Berth)',
  SBC: 'VIP Bed (Soft Berth)',
};

export const TARIFF_REFERENCE: Record<string, Record<string, number>> = {
  LOCAL: {
    'HSC-null': 0.03,
    'HBC-UPPER': 0.04,
    'HBC-MIDDLE': 0.055,
    'HBC-LOWER': 0.06,
    'SBC-UPPER': 0.075,
    'SBC-LOWER': 0.08,
  },
  INTERNATIONAL: {
    'HSC-null': 0.06,
    'HBC-UPPER': 0.08,
    'HBC-MIDDLE': 0.11,
    'HBC-LOWER': 0.12,
    'SBC-UPPER': 0.15,
    'SBC-LOWER': 0.16,
  },
};

export function getTariffRef(nationalityType: string, coachCode: string, bedPosition: string | null) {
  const key = `${coachCode}-${bedPosition ?? 'null'}`;
  return TARIFF_REFERENCE[nationalityType]?.[key];
}
