import { computed } from 'vue';
import { createHelpCenterI18n } from '@/i18n';
import { useLanguage } from './useLanguage';

export function useLocalTranslation() {
  const language = useLanguage();
  const i18n = createHelpCenterI18n(language);
  const t = (key: string) => i18n.t(key);
  const dir = computed(() => (language === 'ar' ? 'rtl' : 'ltr'));
  return { t, dir, i18n };
}
