import { setRequestLocale, getTranslations } from 'next-intl/server';
import { Link } from '@/i18n/routing';

export const dynamic = 'force-dynamic';

export default async function VerifyErrorPage({
  params,
}: {
  params: Promise<{ locale: string }>;
}) {
  const { locale } = await params;
  setRequestLocale(locale);
  const t = await getTranslations('customer.verify');

  return (
    <div className="card p-6 sm:p-8">
      <h1 className="text-xl font-semibold text-ink-900">{t('invalidTitle')}</h1>
      <p className="mt-2 text-sm text-ink-600">{t('invalidBody')}</p>
      <div className="mt-4">
        <Link href="/min-sida" className="btn-primary inline-block">
          {t('tryAgain')}
        </Link>
      </div>
    </div>
  );
}
