import { CookieConsentButton } from "@/components/Blocks/DynamicContent/ManageCookieConsent/CookieConsentButton"
import SectionContainer from "@/components/Section/Container"
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 (
    <SectionContainer>
      <SectionHeader
        link={link}
        preamble={subtitle}
        title={title}
        headingAs="h3"
        headingLevel="h2"
      />
      <CookieConsentButton />
      <SectionLink link={link} variant="mobile" />
    </SectionContainer>
  )
}
