import { useTranslation } from "react-i18next";
import { MealCategory } from "@/types/recipe.types";

export const MEAL_CATEGORY_I18N_KEYS: Record<MealCategory, string> = {
  [MealCategory.Breakfast]: "categories.breakfast",
  [MealCategory.SecondBreakfast]: "categories.secondBreakfast",
  [MealCategory.Lunch]: "categories.lunch",
  [MealCategory.Dinner]: "categories.dinner",
};

export function useMealCategoryLabel(category: MealCategory): string {
  const { t } = useTranslation();
  return t(MEAL_CATEGORY_I18N_KEYS[category]);
}

export function useMealCategoryLabels(): Record<MealCategory, string> {
  const { t } = useTranslation();
  return {
    [MealCategory.Breakfast]: t(MEAL_CATEGORY_I18N_KEYS[MealCategory.Breakfast]),
    [MealCategory.SecondBreakfast]: t(MEAL_CATEGORY_I18N_KEYS[MealCategory.SecondBreakfast]),
    [MealCategory.Lunch]: t(MEAL_CATEGORY_I18N_KEYS[MealCategory.Lunch]),
    [MealCategory.Dinner]: t(MEAL_CATEGORY_I18N_KEYS[MealCategory.Dinner]),
  };
}
