/**
 * English display/matching labels for the `Ingredient` reference catalog
 * (`apps/api/src/db/reference-seed-data.ts`'s `INGREDIENT_GROUPS`), keyed
 * by the same `Ingredient.key` used throughout the app. Used by
 * `apps/api/src/lib/ingredient-matcher.ts` to resolve free-text ingredient
 * lines from English-language recipe sources (e.g. TheMealDB) against our
 * catalog — the English-language counterpart to `apps/web`'s
 * `locales/fr/translation.json` (`catalog.ingredients.<key>`), which
 * serves the same role for the French UI. Hand-authored (not derived from
 * the key) for the same reason the French labels are: natural food
 * vocabulary needs real phrasing, not a mechanical transform.
 */
export const INGREDIENT_LABELS_EN: Record<string, string> = {
  // Vegetables
  tomato: "Tomato",
  onion: "Onion",
  shallot: "Shallot",
  garlic: "Garlic",
  carrot: "Carrot",
  zucchini: "Zucchini",
  cucumber: "Cucumber",
  gherkins: "Gherkins",
  bellPepper: "Bell pepper",
  mushroom: "Mushroom",
  porcini: "Porcini mushrooms",
  eggplant: "Eggplant",
  broccoli: "Broccoli",
  cauliflower: "Cauliflower",
  whiteCabbage: "White cabbage",
  redCabbage: "Red cabbage",
  brusselsSprouts: "Brussels sprouts",
  spinach: "Spinach",
  swissChard: "Swiss chard",
  lettuce: "Lettuce",
  arugula: "Arugula",
  watercress: "Watercress",
  leek: "Leek",
  celery: "Celery",
  radish: "Radish",
  beetroot: "Beetroot",
  turnip: "Turnip",
  parsnip: "Parsnip",
  greenBean: "Green bean",
  pea: "Pea",
  corn: "Corn",
  artichoke: "Artichoke",
  fennel: "Fennel",
  endive: "Endive",
  pumpkin: "Pumpkin",
  butternutSquash: "Butternut squash",
  asparagus: "Asparagus",
  avocado: "Avocado",
  potato: "Potato",
  sweetPotato: "Sweet potato",
  cherryTomato: "Cherry tomatoes",
  bokChoy: "Bok choy",
  soybeanSprouts: "Soybean sprouts",
  shiitake: "Shiitake mushrooms",
  daikon: "Daikon radish",
  freshGreenChili: "Fresh green chili",
  cardoon: "Cardoon",
  radicchio: "Radicchio",
  romanesco: "Romanesco cauliflower",
  kohlrabi: "Kohlrabi",
  napaCabbage: "Napa cabbage",
  celeriac: "Celeriac",
  okra: "Okra",
  springOnion: "Spring onion",
  redKuriSquash: "Red kuri squash",
  rutabaga: "Rutabaga",
  samphire: "Samphire",
  salsify: "Salsify",
  lambsLettuce: "Lamb's lettuce",
  escarole: "Escarole",

  // Fruits
  lemon: "Lemon",
  lime: "Lime",
  apple: "Apple",
  pear: "Pear",
  banana: "Banana",
  orange: "Orange",
  clementine: "Clementine",
  grapefruit: "Grapefruit",
  strawberry: "Strawberry",
  raspberry: "Raspberry",
  blueberry: "Blueberry",
  blackberry: "Blackberry",
  cherry: "Cherry",
  apricot: "Apricot",
  peach: "Peach",
  plum: "Plum",
  grape: "Grape",
  melon: "Melon",
  watermelon: "Watermelon",
  pineapple: "Pineapple",
  mango: "Mango",
  kiwi: "Kiwi",
  fig: "Fig",
  date: "Date",
  lychee: "Lychee",
  pomegranate: "Pomegranate",
  rhubarb: "Rhubarb",
  quince: "Quince",
  blackcurrant: "Blackcurrant",
  cranberry: "Cranberry",
  redcurrant: "Redcurrant",
  persimmon: "Persimmon",
  nectarine: "Nectarine",
  tamarind: "Tamarind",

  // Fresh herbs
  basil: "Basil",
  parsley: "Parsley",
  thyme: "Thyme",
  rosemary: "Rosemary",
  bayLeaf: "Bay leaf",
  chives: "Chives",
  freshCilantro: "Fresh cilantro",
  mint: "Mint",
  oregano: "Oregano",
  dill: "Dill",
  tarragon: "Tarragon",
  savory: "Savory",
  marjoram: "Marjoram",
  sage: "Sage",
  chervil: "Chervil",
  ginger: "Ginger",
  lemongrass: "Lemongrass",
  kaffirLime: "Kaffir lime",

  // Meats
  rabbit: "Rabbit",
  groundBeef: "Ground beef",
  beefSteak: "Beef steak",
  beefRoast: "Beef roast",
  vealCutlet: "Veal cutlet",
  porkTenderloin: "Pork tenderloin",
  porkChop: "Pork chop",
  groundVeal: "Ground veal",
  groundPork: "Ground pork",
  groundLamb: "Ground lamb",
  lamb: "Lamb",
  legOfLamb: "Leg of lamb",
  baconLardons: "Bacon lardons",
  bacon: "Bacon",
  ham: "Cooked ham",
  curedHam: "Cured ham",
  sausage: "Sausage",
  chorizo: "Chorizo",
  merguez: "Merguez",
  prosciutto: "Prosciutto",
  pancetta: "Pancetta",
  mortadella: "Mortadella",
  salami: "Salami",
  andouille: "Andouille sausage",
  andouillette: "Andouillette",
  whitePudding: "White pudding",
  blackPudding: "Black pudding",
  cervelat: "Cervelat",
  rillettes: "Rillettes",
  dryCuredSausage: "Dry-cured sausage",
  bayonneHam: "Bayonne ham",
  coppa: "Coppa",
  rosetteSausage: "Rosette sausage",
  vealLiver: "Veal liver",
  vealKidneys: "Veal kidneys",
  vealBrain: "Veal brain",
  vealSweetbread: "Veal sweetbread",
  beefTongue: "Beef tongue",
  tripe: "Tripe",
  venison: "Venison",
  roeDeer: "Roe deer",
  wildBoar: "Wild boar",
  horseMeat: "Horse meat",
  beefHeart: "Beef heart",
  foieGras: "Foie gras",
  beefMuzzle: "Beef muzzle",
  grisonsDriedBeef: "Grisons dried beef",

  // Poultry
  chicken: "Chicken",
  groundChicken: "Ground chicken",
  turkey: "Turkey",
  groundTurkey: "Ground turkey",
  duck: "Duck",
  duckBreast: "Duck breast",
  quail: "Quail",
  guineaFowl: "Guinea fowl",
  goose: "Goose",
  poultryLiver: "Poultry liver",
  capon: "Capon",
  pigeon: "Pigeon",
  pheasant: "Pheasant",

  // Fish
  salmon: "Salmon",
  tuna: "Tuna",
  cod: "Cod",
  trout: "Trout",
  sardine: "Sardine",
  anchovy: "Anchovy",
  whiting: "Whiting",
  surimi: "Surimi",
  seaBass: "Sea bass",
  seaBream: "Sea bream",
  sole: "Sole",
  turbot: "Turbot",
  hake: "Hake",
  pollock: "Pollock",
  saithe: "Saithe",
  haddock: "Haddock",
  mackerel: "Mackerel",
  herring: "Herring",
  redMullet: "Red mullet",
  skate: "Skate",
  monkfish: "Monkfish",
  halibut: "Halibut",
  swordfish: "Swordfish",
  carp: "Carp",
  pike: "Pike",
  perch: "Perch",
  tilapia: "Tilapia",
  pangasius: "Pangasius",
  smokedSalmon: "Smoked salmon",
  driedFish: "Dried fish",
  eel: "Eel",
  plaice: "Plaice",
  saltCod: "Salt cod",
  lemonSole: "Lemon sole",
  scorpionfish: "Scorpionfish",

  // Shellfish
  shrimp: "Shrimp",
  langoustine: "Langoustines",
  lobster: "Lobster",
  crab: "Crab",
  spinyLobster: "Spiny lobster",
  mussels: "Mussels",
  oysters: "Oysters",
  scallops: "Scallops",
  squid: "Squid",
  octopus: "Octopus",
  clams: "Clams",
  whelks: "Whelks",
  spiderCrab: "Spider crab",
  periwinkle: "Periwinkle",
  crayfish: "Crayfish",
  greyShrimp: "Grey shrimp",
  cockle: "Cockle",
  snail: "Snail",
  cuttlefish: "Cuttlefish",

  // Starches
  semolina: "Semolina",
  couscous: "Couscous",
  bulgur: "Bulgur",
  polenta: "Polenta",
  quinoa: "Quinoa",
  pasta: "Pasta",
  wholeWheatPasta: "Whole wheat pasta",
  rice: "Rice",
  basmatiRice: "Basmati rice",
  brownRice: "Brown rice",
  oats: "Rolled oats",
  spaghetti: "Spaghetti",
  penne: "Penne",
  tagliatelle: "Tagliatelle",
  lasagnaSheets: "Lasagna sheets",
  gnocchi: "Gnocchi",
  arborioRice: "Arborio rice",
  riceNoodles: "Rice noodles",
  udonNoodles: "Udon noodles",
  sobaNoodles: "Soba noodles",
  chineseNoodles: "Chinese noodles",
  riceVermicelli: "Rice vermicelli",
  soyVermicelli: "Soy vermicelli",
  stickyRice: "Sticky rice",
  sushiRice: "Sushi rice",
  jasmineRice: "Jasmine rice",

  // Legumes
  greenLentils: "Green lentils",
  redLentils: "Red lentils",
  chickpeas: "Chickpeas",
  whiteBeans: "White beans",
  kidneyBeans: "Kidney beans",
  blackBeans: "Black beans",
  splitPeas: "Split peas",
  favaBeans: "Fava beans",
  edamame: "Edamame",
  pintoBeans: "Pinto beans",
  flageoletBeans: "Flageolet beans",
  goldenLentils: "Golden lentils",

  // Nuts, seeds and other dry goods
  peanutsShelled: "Peanuts",
  almonds: "Almonds",
  walnuts: "Walnuts",
  hazelnuts: "Hazelnuts",
  cashews: "Cashews",
  pistachios: "Pistachios",
  pecans: "Pecans",
  almondPowder: "Ground almonds",
  pineNuts: "Pine nuts",
  sunflowerSeeds: "Sunflower seeds",
  pumpkinSeeds: "Pumpkin seeds",
  shreddedCoconut: "Shredded coconut",
  raisins: "Raisins",
  prunes: "Prunes",
  driedApricots: "Dried apricots",
  sesameSeeds: "Sesame seeds",
  blackMushrooms: "Black mushrooms",
  noriSeaweed: "Nori seaweed",
  wakameSeaweed: "Wakame seaweed",
  kombuSeaweed: "Kombu seaweed",
  bambooShoots: "Bamboo shoots",
  waterChestnuts: "Water chestnuts",

  // Breads
  bread: "Bread",
  sandwichBread: "Sandwich bread",
  wholeWheatBread: "Whole wheat bread",
  baguette: "Baguette",
  ryeBread: "Rye bread",
  breadcrumbs: "Breadcrumbs",
  burgerBun: "Burger bun",
  briocheBun: "Brioche bun",
  hotDogBun: "Hot dog bun",
  pitaBread: "Pita bread",
  bagel: "Bagel",
  naan: "Naan",
  wrapBread: "Wrap bread",
  vienneseBread: "Vienna bread",
  countryBread: "Country bread",
  multigrainBread: "Multigrain bread",
  breadRoll: "Bread roll",
  swedishBread: "Swedish bread",
  glutenFreeBread: "Gluten-free bread",
  rusk: "Rusk",
  croutons: "Croutons",
  focaccia: "Focaccia",
  ciabatta: "Ciabatta",
  cornTortilla: "Corn tortilla",
  wheatTortilla: "Wheat tortilla",
  breadstick: "Breadstick",

  // Raw dough
  puffPastry: "Puff pastry",
  shortcrustPastry: "Shortcrust pastry",
  pizzaDough: "Pizza dough",
  sweetShortcrustPastry: "Sweet shortcrust pastry",

  // Dairy
  milk: "Milk",
  butter: "Butter",
  cremeFraiche: "Crème fraîche",
  liquidCream: "Liquid cream",
  cheese: "Cheese",
  emmental: "Emmental",
  gruyere: "Gruyère",
  parmesan: "Parmesan",
  mozzarella: "Mozzarella",
  goatCheese: "Goat cheese",
  feta: "Feta",
  comte: "Comté",
  fromageBlanc: "Fromage blanc",
  mascarpone: "Mascarpone",
  yogurt: "Yogurt",
  burrata: "Burrata",
  ricotta: "Ricotta",
  pecorino: "Pecorino",
  gorgonzola: "Gorgonzola",
  cheddar: "Cheddar",
  brie: "Brie",
  camembert: "Camembert",
  roquefort: "Roquefort",
  munster: "Munster cheese",
  reblochon: "Reblochon",
  cantal: "Cantal",
  beaufort: "Beaufort",
  saintNectaire: "Saint-Nectaire",
  blueCheese: "Blue cheese",
  cancoillotte: "Cancoillotte",
  tomme: "Tomme cheese",
  epoisses: "Époisses",
  chaource: "Chaource",
  livarot: "Livarot",
  pontLeveque: "Pont-l'Évêque",
  morbier: "Morbier",
  racletteCheese: "Raclette cheese",
  fourmeDAmbert: "Fourme d'Ambert",
  salers: "Salers",
  ossauIraty: "Ossau-Iraty",
  vacherin: "Vacherin",
  saintMarcellin: "Saint-Marcellin",
  neufchatel: "Neufchâtel",
  crottinDeChavignol: "Crottin de Chavignol",
  abondanceCheese: "Abondance cheese",
  carreDeLEst: "Carré de l'Est",
  edam: "Edam",
  gouda: "Gouda",
  mimolette: "Mimolette",
  maroilles: "Maroilles",
  montDor: "Mont d'Or",
  kefir: "Kefir",
  greekYogurt: "Greek yogurt",

  // Eggs
  egg: "Egg",
  eggYolk: "Egg yolk",
  eggWhite: "Egg white",

  // Plant-based alternatives
  coconutMilk: "Coconut milk",
  coconutCream: "Coconut cream",
  almondMilk: "Almond milk",
  oatMilk: "Oat milk",
  tofu: "Tofu",
  silkenTofu: "Silken tofu",

  // Spices
  herbesDeProvence: "Herbes de Provence",
  blackPepper: "Black pepper",
  paprika: "Paprika",
  espelettePepper: "Espelette pepper",
  cayennePepper: "Cayenne pepper",
  cumin: "Cumin",
  curryPowder: "Curry powder",
  turmeric: "Turmeric",
  cinnamon: "Cinnamon",
  nutmeg: "Nutmeg",
  saffron: "Saffron",
  clove: "Clove",
  vanillaBean: "Vanilla bean",
  whitePepper: "White pepper",
  pinkPepper: "Pink peppercorns",
  sichuanPepper: "Sichuan pepper",
  smokedPaprika: "Smoked paprika",
  birdEyeChili: "Bird's eye chili",
  juniperBerries: "Juniper berries",
  starAnise: "Star anise",
  greenAnise: "Green anise",
  fennelSeeds: "Fennel seeds",
  sumac: "Sumac",
  nigella: "Nigella seeds",
  allspice: "Allspice",
  colomboPowder: "Colombo powder",
  baharat: "Baharat",
  horseradish: "Horseradish",
  herbSalt: "Herb salt",
  celerySalt: "Celery salt",
  fleurDeSel: "Fleur de sel",
  salt: "Salt",
  fiveSpice: "Five-spice powder",
  garamMasala: "Garam masala",
  corianderSeeds: "Coriander seeds",
  groundCoriander: "Ground coriander",
  cardamom: "Cardamom",
  fenugreek: "Fenugreek",
  jalapeno: "Jalapeño",
  chipotle: "Chipotle",
  poblanoPepper: "Poblano pepper",
  habanero: "Habanero",
  rasElHanout: "Ras el hanout",
  zaatar: "Za'atar",

  // Sauces
  soySauce: "Soy sauce",
  mustard: "Mustard",
  mayonnaise: "Mayonnaise",
  ketchup: "Ketchup",
  tabasco: "Tabasco sauce",
  worcestershireSauce: "Worcestershire sauce",
  fishSauce: "Fish sauce",
  wasabi: "Wasabi",
  harissa: "Harissa",
  curryPaste: "Curry paste",
  peanutButter: "Peanut butter",
  dijonMustard: "Dijon mustard",
  wholegrainMustard: "Wholegrain mustard",
  barbecueSauce: "Barbecue sauce",
  tartarSauce: "Tartar sauce",
  cocktailSauce: "Cocktail sauce",
  bearnaiseSauce: "Béarnaise sauce",
  hollandaiseSauce: "Hollandaise sauce",
  bechamelSauce: "Béchamel sauce",
  teriyakiSauce: "Teriyaki sauce",
  ponzuSauce: "Ponzu sauce",
  chimichurri: "Chimichurri",
  redPesto: "Red pesto",
  pesto: "Pesto",
  oysterSauce: "Oyster sauce",
  hoisinSauce: "Hoisin sauce",
  sriracha: "Sriracha",
  sweetChiliSauce: "Sweet chili sauce",
  miso: "Miso",
  shrimpPaste: "Shrimp paste",
  redCurryPaste: "Red curry paste",
  greenCurryPaste: "Green curry paste",
  tahini: "Tahini",
  aioli: "Aioli",
  vinaigrette: "Vinaigrette",
  hummus: "Hummus",

  // Seasonings — oils, vinegars, wines and other flavorings
  oliveOil: "Olive oil",
  sunflowerOil: "Sunflower oil",
  rapeseedOil: "Rapeseed oil",
  coconutOil: "Coconut oil",
  sesameOil: "Sesame oil",
  ciderVinegar: "Cider vinegar",
  whiteVinegar: "White vinegar",
  balsamicVinegar: "Balsamic vinegar",
  capers: "Capers",
  olives: "Olives",
  blackOlives: "Black olives",
  greenOlives: "Green olives",
  whiteWine: "White wine",
  redWine: "Red wine",
  roseWine: "Rosé wine",
  redWineVinegar: "Red wine vinegar",
  whiteWineVinegar: "White wine vinegar",
  sherryVinegar: "Sherry vinegar",
  walnutOil: "Walnut oil",
  hazelnutOil: "Hazelnut oil",
  peanutOil: "Peanut oil",
  chiliOil: "Chili oil",
  riceVinegar: "Rice vinegar",
  cornOil: "Corn oil",
  grapeseedOil: "Grapeseed oil",
  soybeanOil: "Soybean oil",
  palmOil: "Palm oil",
  mirin: "Mirin",
  sake: "Sake",
  lemonJuice: "Lemon juice",
  limeJuice: "Lime juice",
  orangeJuice: "Orange juice",
  appleJuice: "Apple juice",
  grapeJuice: "Grape juice",
  tomatoJuice: "Tomato juice",
  cranberryJuice: "Cranberry juice",
  coffee: "Coffee",
  tea: "Tea",
  beer: "Beer",
  cider: "Cider",
  champagne: "Champagne / sparkling wine",
  portWine: "Port wine",
  vinJaune: "Vin jaune (Jura wine)",
  cognac: "Cognac",
  rum: "Rum",
  whisky: "Whisky",
  vodka: "Vodka",

  // Bases — flours, stocks and other cooking essentials
  wheatFlour: "Wheat flour",
  wholeWheatFlour: "Whole wheat flour",
  cornFlour: "Corn flour",
  buckwheatFlour: "Buckwheat flour",
  riceFlour: "Rice flour",
  vegetableStockCube: "Vegetable stock cube",
  chickenStockCube: "Chicken stock cube",
  tomatoPaste: "Tomato paste",
  tomatoCoulis: "Tomato coulis",
  cannedPeeledTomatoes: "Canned peeled tomatoes",
  sunDriedTomatoes: "Sun-dried tomatoes",
  vealStock: "Veal stock",
  chickenStock: "Chicken stock",
  beefStockCube: "Beef stock cube",
  fishStockCube: "Fish stock cube",
  vegetableBroth: "Vegetable broth",
  chickenBroth: "Chicken broth",
  beefBroth: "Beef broth",
  courtBouillon: "Court bouillon",
  dashi: "Dashi (Japanese stock)",
  shellfishBisque: "Shellfish bisque",
  tapiocaFlour: "Tapioca flour",
  masaHarina: "Masa harina",
  water: "Water",
  sparklingWater: "Sparkling water",
  orangeBlossomWater: "Orange blossom water",
  roseWater: "Rose water",
  fishFumet: "Fish fumet",

  // Thickeners and raising agents
  bakersYeast: "Baker's yeast",
  bakingPowder: "Baking powder",
  cornstarch: "Cornstarch",
  lupinFlour: "Lupin flour",
  gelatin: "Gelatin",
  bakingSoda: "Baking soda",
  potatoStarch: "Potato starch",

  // Sugars
  sugar: "Sugar",
  honey: "Honey",
  mapleSyrup: "Maple syrup",
  brownSugar: "Brown sugar",
  powderedSugar: "Powdered sugar",
  demeraraSugar: "Demerara sugar",
  darkChocolate: "Dark chocolate",
  milkChocolate: "Milk chocolate",
  whiteChocolate: "White chocolate",
  chocolateChips: "Chocolate chips",
  cocoaPowder: "Cocoa powder",
  vanillaExtract: "Vanilla extract",
  palmSugar: "Palm sugar",
  caneSyrup: "Cane syrup",
};

/**
 * Extra English matching phrases for a handful of {@link INGREDIENT_LABELS_EN}
 * entries whose primary label doesn't cover a common alternate wording used
 * by real recipe sources (e.g. TheMealDB's `"Vanilla Pod"` vs. this
 * catalog's own `"Vanilla bean"`) — see issue #54. Deliberately a *second*,
 * mostly-empty map rather than widening `INGREDIENT_LABELS_EN` itself to
 * `string | string[]` for every one of its ~550 entries: only entries that
 * actually need an alternate wording are listed here, so this stays a
 * short, easy-to-scan list of exceptions instead of turning every other
 * entry into a single-item array for no reason. `apps/api`'s
 * `ingredient-matcher.ts` (`loadIngredientCatalog`) adds one extra catalog
 * entry per synonym, alongside the primary label — matched exactly the same
 * way, `matchIngredientName` itself doesn't need to know synonyms exist.
 */
export const INGREDIENT_LABEL_SYNONYMS_EN: Record<string, string[]> = {
  vanillaBean: ["Vanilla pod"],
};

/**
 * English matching synonyms for the `Unit` reference catalog
 * (`apps/api/src/db/reference-seed-data.ts`'s `UNITS`), keyed by
 * `Unit.key`. Unlike {@link INGREDIENT_LABELS_EN} (one display label per
 * entry), a unit needs *several* accepted spellings to be useful for
 * matching — English recipe text freely mixes full words and abbreviations
 * ("tablespoon", "tbsp", "tbs" all appear in the wild), which a single
 * label can't capture. Used by `apps/api/src/lib/ingredient-matcher.ts` the
 * same way `INGREDIENT_LABELS_EN` is: resolving free text from
 * English-language sources against our catalog.
 */
export const UNIT_LABELS_EN: Record<string, string[]> = {
  gram: ["g", "gr", "gram", "grams"],
  kilogram: ["kg", "kilo", "kilos", "kilogram", "kilograms"],
  milliliter: ["ml", "milliliter", "milliliters", "millilitre", "millilitres"],
  centiliter: ["cl", "centiliter", "centiliters", "centilitre", "centilitres"],
  liter: ["l", "liter", "liters", "litre", "litres"],
  tablespoon: ["tbsp", "tbs", "tbl", "tablespoon", "tablespoons"],
  teaspoon: ["tsp", "teaspoon", "teaspoons"],
  piece: ["piece", "pieces", "pc", "pcs"],
  pinch: ["pinch", "pinches"],
  slice: ["slice", "slices"],
  clove: ["clove", "cloves"],
  bunch: ["bunch", "bunches"],
  sachet: ["sachet", "sachets", "packet", "packets", "sac", "sacs"],
  sprig: ["sprig", "sprigs"],
  cup: ["cup", "cups"],
  ounce: ["oz", "ounce", "ounces"],
  pound: ["lb", "lbs", "pound", "pounds"],
};
