"use client";

import { Checkbox } from "@/components/atoms/checkbox";
import { Label } from "@/components/atoms";

interface MarketingCheckboxProps {
  checked: boolean;
  onChange: (checked: boolean) => void;
  disabled?: boolean | undefined;
}

export function MarketingCheckbox({ checked, onChange, disabled }: MarketingCheckboxProps) {
  return (
    <div className="flex items-start gap-2">
      <Checkbox
        id="marketingConsent"
        checked={checked}
        onChange={e => onChange(e.target.checked)}
        disabled={disabled}
      />
      <Label
        htmlFor="marketingConsent"
        className="text-sm font-normal leading-tight cursor-pointer"
      >
        I would like to receive marketing emails and updates
      </Label>
    </div>
  );
}
