import { useLanguageStore } from '../stores/languageStore';
import { en } from './en';
import { fr } from './fr';

const translations = { en, fr };

export function useTranslation() {
  const language = useLanguageStore(s => s.language);
  const t = translations[language] ?? en;
  return { t, language };
}
