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

import { Link } from '@/i18n/navigation';

// This page renders when a route like `/unknown.txt` is requested.
// In this case, the layout at `app/[locale]/layout.tsx` receives
// an invalid value as the `[locale]` param and calls `notFound()`.

export default async function GlobalNotFound() {
  const t = await getTranslations('notFoundPage');

  return (
    <div className="min-h-[60vh] flex flex-col justify-center items-center text-center gap-6">
      <h2 className="text-2xl font-bold">{t('heading')}</h2>
      <p className="text-gray-500">{t('description')}</p>
      <Link
        href="/"
        className="px-6 py-2 bg-mma-blue text-mma-yellow rounded-lg font-semibold hover:bg-mma-yellow hover:text-mma-blue border border-mma-blue transition"
      >
        {t('backToHome')}
      </Link>
    </div>
  );
}
