import { trainTypeID } from "@/lib/CommonTypes";

type types = (types: trainTypeID, id: string) => [string, boolean, boolean];
export const getStringConfig: types = (type, id) => {
  switch (type) {
    case "Normal":
      return ["普通", true, false];
    case "OneMan":
      return ["普通", true, true];
    case "Rapid":
      return ["快速", true, false];
    case "OneManRapid":
      return ["快速", true, true];
    case "LTDEXP":
      return ["特急", true, false];
    case "NightLTDEXP":
      return ["特急", true, false];
    case "SPCL":
      return ["臨時", true, false];
    case "SPCL_Normal":
      return ["臨時", true, false];
    case "SPCL_Rapid":
      return ["臨時快速", true, false];
    case "SPCL_EXP":
      return ["臨時特急", true, false];
    case "Party":
      return ["団体臨時", true, false];
    case "Freight":
      return ["貨物", false, false];
    case "Forwarding":
      return ["回送", false, false];
    case "FreightForwarding":
      return ["単機回送", false, false];
    case "Other":
      switch (true) {
        case !!id.includes("T"):
          return ["単機回送", false, false];
        case !!id.includes("R"):
        case !!id.includes("E"):
        case !!id.includes("L"):
        case !!id.includes("A"):
        case !!id.includes("B"):
          return ["回送", false, false];
        case !!id.includes("H"):
          return ["試運転", false, false];
      }
      return ["", false, false];
  }
};
