import { CookieConsentButton } from "@/components/Blocks/DynamicContent/ManageCookieConsent/CookieConsentButton"
import { Section } from "@/components/Section"
import { SectionHeader } from "@/components/Section/Header"
import SectionLink from "@/components/Section/Link"

interface ManageCookieConsentProps {
  title?: string
  subtitle?: string
  link?: { href: string; text: string }
}

export function ManageCookieConsent({
  title,
  subtitle,
  link,
}: ManageCookieConsentProps) {
  return (
    <Section>
      <SectionHeader
        link={link}
        preamble={subtitle}
        heading={title}
        typography="Title/sm"
      />
      <CookieConsentButton />
      {link ? <SectionLink link={link} variant="mobile" /> : null}
    </Section>
  )
}
