import type { Metadata } from "next";
import { CookiePreferences } from "@/components/legal/cookie-preferences";
import { LegalShell } from "@/components/legal/legal-shell";
import { getResolvedSiteText } from "@/lib/site-text-server";
import { text } from "@/lib/site-text";

export const metadata: Metadata = {
  title: "Préférences cookies",
  robots: { index: false, follow: false },
};

export default async function PreferencesCookiesPage() {
  const siteText = await getResolvedSiteText();
  const t = (key: string, fallback?: string) => text(siteText, key, fallback);

  return (
    <LegalShell
      eyebrow={t("legal.cookiesPref.eyebrow")}
      title={t("legal.cookiesPref.title")}
      description={t("legal.cookiesPref.description")}
    >
      <p>{t("legal.cookiesPref.intro")}</p>
      <CookiePreferences />
    </LegalShell>
  );
}
