import arShell from '@/content/locales/ar/shell.json';
import enShell from '@/content/locales/en/shell.json';
import frShell from '@/content/locales/fr/shell.json';
import { isLocale, type Locale } from './config';
import type { ShellMessages } from './messages';

const shells = {
  en: enShell,
  fr: frShell,
  ar: arShell,
} satisfies Record<Locale, ShellMessages>;

export function getClientShellMessages(value: unknown): ShellMessages {
  return isLocale(value) ? shells[value] : shells.en;
}
