"use client"

import { useSearchParams } from "next/navigation"
import { Suspense } from "react"
import { ResetPasswordPageContent } from "@/components/auth/reset-password-page-content"
import { buildRecoveryFlowQuery } from "@/lib/auth/recovery-flow-query"

function ResetPasswordContent() {
  const searchParams = useSearchParams()
  const flowQuery = buildRecoveryFlowQuery(searchParams)

  return <ResetPasswordPageContent flowQuery={flowQuery} />
}

export default function ResetPasswordPage() {
  return (
    <Suspense fallback={null}>
      <ResetPasswordContent />
    </Suspense>
  )
}
