import type { Metadata } from "next";
import { ContactForm } from "@/components/ContactForm";
import { InnerPage, StructuredData } from "@/components/SiteChrome";
import { readConfig } from "@/lib/config";
import { breadcrumbJsonLd } from "@/lib/site";

export const dynamic = "force-dynamic";

export const metadata: Metadata = {
  title: "Contact",
  description: "Contact the Clipwell operator about the downloader, a failed request, or a copyright notice.",
  alternates: { canonical: "/contact" },
  openGraph: { title: "Contact Clipwell", description: "Send a message to the Clipwell operator.", url: "/contact" },
};

export default function ContactPage() {
  const config = readConfig();
  return (
    <main id="main">
      <StructuredData data={breadcrumbJsonLd([{ name: "Home", path: "/" }, { name: "Contact", path: "/contact" }])} />
      <InnerPage title="Contact" lede="Questions about a download, a privacy request, or a copyright notice can be sent here.">
        <ContactForm email={config.contactEmail} />
      </InnerPage>
    </main>
  );
}
