import type { Locale } from "@/config/site";

type Dictionary = {
  [key: string]: {
    ar: string;
    en: string;
  };
};

const dictionary: Dictionary = {
  home: { ar: "الرئيسية", en: "Home" },
  stores: { ar: "المتاجر", en: "Stores" },
  coupons: { ar: "الكوبونات", en: "Coupons" },
  cashback: { ar: "كاش باك", en: "Cashback" },
  categories: { ar: "الأقسام", en: "Categories" },
  favorites: { ar: "المفضلة", en: "Favorites" },
  login: { ar: "تسجيل الدخول", en: "Login" },
  register: { ar: "إنشاء حساب", en: "Register" },
  searchPlaceholder: { ar: "ابحث عن متجر أو كوبون...", en: "Search stores or coupons..." },
};

export function t(locale: Locale, key: keyof typeof dictionary): string {
  return dictionary[key][locale];
}

export { dictionary };
