import type { Metadata } from "next";
import Link from "next/link";
import { pageSeo } from "@/content/page-seo";
import { createPageMetadata } from "@/lib/seo";
import {
  partnersIntro,
  sponsorSections,
  exhibitorSections,
  supporterSections,
  mediaPartnerSections,
} from "@/content/partners";
import { PageRiftHeader } from "@/components/layout/PageRiftHeader";
import { Section } from "@/components/layout/Section";
import { PartnerSectionBlock } from "@/components/partners/PartnerSectionBlock";
import { PartnershipCtaBand } from "@/components/partners/PartnershipCtaBand";
import { Button } from "@/components/ui/button";
import { ChampionStartupModal } from "@/components/partners/ChampionStartupModal";

export const metadata: Metadata = createPageMetadata(pageSeo.partners);

export default function PartnersPage() {
  return (
    <>
      <PageRiftHeader
        variant="partners"
        eyebrow={partnersIntro.eyebrow}
        title={<h1 className="max-w-4xl text-4xl font-bold md:text-5xl">{partnersIntro.headline}</h1>}
        description={<p className="text-lg leading-relaxed">{partnersIntro.subheadline}</p>}
      >
        <div className="flex flex-wrap gap-3">
          <Button className="rounded-full bg-[#37a47a] text-[#ffffff] hover:bg-[#37a47a]/90" asChild>
            <Link href="#partnership-form">Become a partner</Link>
          </Button>
          <ChampionStartupModal />
        </div>
      </PageRiftHeader>

      <Section>
        <div className="space-y-16">
          {sponsorSections.map((section, index) => (
            <PartnerSectionBlock
              key={section.id}
              section={section}
              showTitle={index === 0}
            />
          ))}
        </div>
      </Section>

      <Section>
        <div className="space-y-16">
          {exhibitorSections.map((section) => (
            <PartnerSectionBlock key={section.id} section={section} />
          ))}
        </div>
      </Section>

      <Section>
        <div className="space-y-16">
          {supporterSections.map((section) => (
            <PartnerSectionBlock key={section.id} section={section} />
          ))}
          {mediaPartnerSections.map((section) => (
            <PartnerSectionBlock key={section.id} section={section} />
          ))}
        </div>
      </Section>

      <PartnershipCtaBand />
    </>
  );
}
