import { ForgotPasswordForm } from '@/components/auth/ForgotPasswordForm'
import { isLocale, type Locale } from '@/lib/localization/config'
import { notFound } from 'next/navigation'
import { Suspense } from 'react'

export default async function ForgotPasswordPage({
  params,
}: {
  params: Promise<{ locale: string }>
}) {
  const { locale: localeValue } = await params
  if (!isLocale(localeValue)) notFound()
  const locale = localeValue as Locale

  return (
    <Suspense fallback={null}>
      <ForgotPasswordForm locale={locale} />
    </Suspense>
  )
}
