export const getRoleFromUrl = () => {
  switch (window.location.pathname.split("/")[1]) {
    case "city":
      return "CityOperator";
    case "aviculture":
      return "Poultry";
    case "province":
      return "ProvinceOperator";
    case "slaughter":
      return "KillHouse";
    case "slaughter-house-vet":
      return "KillHouseVet";
    case "vetfarm":
      return "VetFarm";
    case "financial":
      return "ProvinceFinancial";
    case "inspector":
      return "ProvinceInspector";
    case "vet-supervisor":
      return "VetSupervisor";
    case "commerce":
      return "Commerce";
    case "city-commerce":
      return "CityCommerce";
    case "city-vet":
      return "CityVet";
    case "city-jahad":
      return "CityJahad";
    case "observatory":
      return "Observatory";
    case "province-supervisor":
      return "ProvinceSupervisor";
    case "guild":
      return "Guilds";
    case "senf":
      return "Guilds";
    case "steward":
      return "Steward";
    case "guild-room":
      return "GuildRoom";
    case "livestock":
      return "LiveStockSupport";
    case "superadmin":
      return "SuperAdmin";
    case "chaincompany":
      return "ChainCompany";
    case "adminx":
      return "AdminX";
    case "supporter":
      return "Supporter";
    case "dispenser":
      return "Dispenser";
    case "citypoultry":
      return "CityPoultry";
    case "driver":
      return "Driver";
    case "parent-company":
      return "ParentCompany";
    case "cold-house-steward":
      return "ColdHouseSteward";
    case "city-guild":
      return "CityGuild";
    case "province-jahad":
      return "LiveStockProvinceJahad";
    case "union":
      return "Union";
    case "cooperative":
      return "Cooperative";
    case "rancher":
      return "Rancher";
    case "psp-company":
      return "PosCompany";
    case "poultry-science":
      return "PoultryScience";
    default:
      return null;
  }
};

export const getActualRoleFromRole = (role) => {
  switch (role) {
    case "city":
      return "CityOperator";
    case "aviculture":
      return "Poultry";
    case "province":
      return "ProvinceOperator";
    case "slaughter":
      return "KillHouse";
    case "slaughter-house-vet":
    case "vetfarm":
      return "Vet";
    case "financial":
      return "ProvinceFinancial";
    default:
      return null;
  }
};
