import type { Metadata } from "next";
import { Suspense } from "react";
import { LoginForm } from "./components/LoginForm";
import { Footer } from "../../components/Footer";

// robots: noindex — account area, same reasoning as /checkout.
export const metadata: Metadata = {
  title: "Anmelden",
  description: "Melde dich bei deinem einfach produktiv-Konto an.",
  robots: {
    index: false,
    follow: true,
  },
};

export default function KontoLoginPage() {
  return (
    <>
      <main className="flex flex-col flex-1 bg-bg-base">
        {/* Suspense required — LoginForm uses useSearchParams() (?redirect=,
            e.g. from WishlistButton's login-gate) which opts any consumer
            into client-side rendering unless wrapped. */}
        <Suspense fallback={null}>
          <LoginForm />
        </Suspense>
      </main>
      <Footer />
    </>
  );
}
