import { TicketType } from "common/common-types";

interface ticketLabel {
  [key: string]: string;
}

const tariffLabelMap: ticketLabel = {
  FREE: "Volný",
  CHILDREN: "Dětský",
  STUDENT: "Studentský",
  ADULT: "Dospělý",
  SENIOR: "Seniorský",
};

const typeLabelMap: ticketLabel = {
  SINGLE_ENTRY: "Jednorázový",
  MULTIPLE_ENTRY: "Vícevstupový",
};

export function ticketTypeLabelMaker(data: TicketType) {
  return `${typeLabelMap[data.type]} - ${tariffLabelMap[data.tariff]} ${
    data.number_of_entries ? `(${data.number_of_entries})` : ""
  }`;
}
