import { getTranslations, setRequestLocale } from 'next-intl/server'
import { Link } from '@/i18n/navigation'
import { PageShell } from '@/components/PageShell'
import { LoginForm } from './LoginForm'

export default async function LoginPage({ params }: { params: Promise<{ locale: string }> }) {
  const { locale } = await params
  setRequestLocale(locale)
  const t = await getTranslations('Login')

  return (
    <PageShell title={t('title')}>
      <div className="box-content">
        <div className="body-box-content centered">
          <LoginForm />
          <br />
          <p>
            <Link href="/recover">{t('forgot')}</Link>
          </p>
          <p>
            <Link href="/recover">{t('forgotActivation')}</Link>
          </p>
          <br />
          <p>
            {t('newHere')} <Link href="/register">{t('createAccount')}</Link>
          </p>
          <br />
          <p className="grey-info2">{t('publicNote')}</p>
        </div>
      </div>
    </PageShell>
  )
}
