import { getRequestConfig } from 'next-intl/server';

/**
 * next-intl request configuration (server-side).
 *
 * We're shipping the framework without routing — there's no `/<locale>/`
 * URL prefix yet because there's no localisation target (English-only
 * today). When/if we add a second locale, swap to next-intl's "i18n
 * routing" mode and move route folders under `[locale]/`.
 *
 * The plugin in `next.config.ts` points at this file. Components call
 * `useTranslations('common')` to opt in.
 */
export default getRequestConfig(async () => {
  const locale = 'en';
  return {
    locale,
    messages: (await import(`../../messages/${locale}.json`)).default,
  };
});
