import { LinkButton } from "@/components/ui/LinkButton";
import { advisoryDisclaimer } from "@/design-system/navigation";

export interface CtaSectionProps {
  title: string;
  description?: string;
  primaryLabel: string;
  primaryHref: string;
  secondaryLabel?: string;
  secondaryHref?: string;
  showDisclaimer?: boolean;
}

/** One primary CTA per screen (Sprint 2 §07) — used to close a page, not to decorate it. */
export function CtaSection({
  title,
  description,
  primaryLabel,
  primaryHref,
  secondaryLabel,
  secondaryHref,
  showDisclaimer = true,
}: CtaSectionProps) {
  return (
    <section className="border-t border-line py-20">
      <div className="container flex flex-col items-center gap-6 text-center">
        <h2 className="max-w-2xl text-balance font-display text-h1 font-normal text-ink">{title}</h2>
        {description && <p className="max-w-xl text-body-lg text-ink-soft">{description}</p>}
        <div className="mt-2 flex flex-wrap items-center justify-center gap-4">
          <LinkButton href={primaryHref} variant="primary" size="lg">
            {primaryLabel}
          </LinkButton>
          {secondaryLabel && secondaryHref && (
            <LinkButton href={secondaryHref} variant="secondary" size="lg">
              {secondaryLabel}
            </LinkButton>
          )}
        </div>
        {showDisclaimer && <p className="mt-4 max-w-xl text-caption text-slate">{advisoryDisclaimer}</p>}
      </div>
    </section>
  );
}
