import { localizedMetadata } from "@/lib/i18n/serverMetadata";
import type { Metadata } from "next";

import ResetPasswordRoute from "@/features/auth/components/ResetPasswordRoute";

/*
 * Title only; `robots: noindex` comes from `(auth)/layout.tsx` and the rest
 * from the root layout. Previously a Client Component — which cannot export
 * `metadata` — because it read `useSearchParams`; that now lives in
 * `ResetPasswordRoute`, with the same Suspense boundary and the same props.
 */
const pageMetadata: Metadata = {
  title: "Choose a new password",
};

export async function generateMetadata(): Promise<Metadata> {
  return localizedMetadata(pageMetadata);
}

export default function ResetPasswordPage() {
  return <ResetPasswordRoute />;
}
