{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "newsletter-4",
  "dependencies": [
    "lucide-react",
    "react-icons"
  ],
  "registryDependencies": [
    "button",
    "card",
    "input",
    "utils"
  ],
  "files": [
    {
      "path": "src/components/watermelon-ui/newsletter-4.tsx",
      "content": "import type { FormEvent } from \"react\";\nimport { RiMailFill } from \"react-icons/ri\";\nimport { cn } from \"@/lib/utils\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card } from \"@/components/ui/card\";\nimport { Input } from \"@/components/ui/input\";\n\nexport interface NewsletterVisual {\n  src: string;\n  alt: string;\n  label: string;\n}\n\nexport interface NewsletterLink {\n  label: string;\n  href: string;\n}\n\nexport interface Newsletter4Props {\n  brand?: string;\n  headline?: string;\n  description?: string;\n  emailPlaceholder?: string;\n  buttonLabel?: string;\n  consentText?: string;\n  links?: NewsletterLink[];\n  visual?: NewsletterVisual;\n  onClose?: () => void;\n  onSubmit?: (email: string) => void;\n  className?: string;\n}\n\nconst defaultLinks: NewsletterLink[] = [\n  { label: \"Privacy Policy\", href: \"/privacy\" },\n  { label: \"Member Terms\", href: \"/terms\" },\n];\n\nconst defaultVisual: NewsletterVisual = {\n  src: \"https://images.unsplash.com/photo-1515886657613-9f3515b0c78f?auto=format&fit=crop&w=1000&q=80\",\n  alt: \"Editorial fashion detail with a model wearing a textured jacket\",\n  label: \"Studio Notes\",\n};\n\nexport default function Newsletter4({\n  headline = \"Get the edit\",\n  description = \"Join our weekly letter for quiet design finds, studio rituals, and early access to limited releases.\",\n  emailPlaceholder = \"Email address\",\n  buttonLabel = \"Subscribe\",\n  consentText = \"By joining, you agree to receive thoughtful updates from our studio.\",\n  links = defaultLinks,\n  visual = defaultVisual,\n\n  onSubmit,\n  className,\n}: Newsletter4Props) {\n  const handleSubmit = (event: FormEvent<HTMLFormElement>) => {\n    event.preventDefault();\n    const formData = new FormData(event.currentTarget);\n    const email = String(formData.get(\"email\") ?? \"\");\n    onSubmit?.(email);\n  };\n\n  return (\n    <section\n      className={cn(\n        \"bg-background flex items-center justify-center p-4 sm:p-6\",\n        className,\n      )}\n    >\n      <Card className=\"border-border bg-card relative grid w-full max-w-5xl overflow-hidden rounded-4xl p-0 shadow-sm md:grid-cols-2\">\n        <div className=\"flex min-h-96 flex-col justify-center px-8 py-12 sm:px-12 md:px-14 lg:px-16\">\n          <div className=\"max-w-md space-y-5\">\n            <div className=\"space-y-3\">\n              <h2 className=\"text-foreground text-4xl font-bold tracking-tight sm:text-5xl\">\n                {headline}\n              </h2>\n              <p className=\"text-muted-foreground text-base leading-relaxed sm:text-lg\">\n                {description}\n              </p>\n            </div>\n\n            <form className=\"space-y-4\" onSubmit={handleSubmit}>\n              <div className=\"relative\">\n                <RiMailFill className=\"text-muted-foreground pointer-events-none absolute top-1/2 left-4 h-5 w-5 -translate-y-1/2\" />\n                <Input\n                  name=\"email\"\n                  type=\"email\"\n                  required\n                  placeholder={emailPlaceholder}\n                  className=\"focus-visible:ring-primary/20 bg-muted focus-visible:border-primary/50 h-12 rounded-xl pl-11 text-base shadow-[inset_0_2px_4px_0_rgba(255,255,255,0.2),inset_0_-2px_4px_0_rgba(0,0,0,0.08)] dark:shadow-[inset_0_-2px_4px_0_rgba(0,0,0,0.2),inset_0_2px_4px_0_rgba(255,255,255,0.1)]\"\n                />\n              </div>\n\n              <Button\n                type=\"submit\"\n                className=\"h-12 w-full rounded-xl text-base font-semibold shadow-[inset_0_2px_4px_0_rgba(255,255,255,0.7),inset_0_-2px_4px_0_rgba(0,0,0,0.2)] dark:shadow-[inset_0_-2px_4px_0_rgba(0,0,0,0.2),inset_0_2px_4px_0_rgba(255,255,255,0.5)]\"\n              >\n                {buttonLabel}\n              </Button>\n            </form>\n\n            <p className=\"text-muted-foreground text-xs leading-relaxed\">\n              {consentText}{\" \"}\n              {links.map((link, index) => (\n                <span key={link.label}>\n                  <a\n                    href={link.href}\n                    className=\"hover:text-foreground font-medium underline underline-offset-4\"\n                  >\n                    {link.label}\n                  </a>\n                  {index < links.length - 1 ? \" and \" : \".\"}\n                </span>\n              ))}\n            </p>\n          </div>\n        </div>\n\n        <div className=\"bg-muted relative min-h-60 overflow-hidden md:min-h-full\">\n          <img\n            src={visual.src}\n            alt={visual.alt}\n            className=\"h-full w-full object-cover\"\n          />\n          <div className=\"bg-foreground/20 absolute inset-0\" />\n          <div className=\"absolute inset-x-0 bottom-0 p-8 sm:p-10\">\n            <h3 className=\"text-primary-foreground max-w-xs text-4xl leading-none font-bold tracking-tight sm:text-5xl\">\n              {visual.label}\n            </h3>\n          </div>\n        </div>\n      </Card>\n    </section>\n  );\n}\n",
      "type": "registry:ui",
      "target": "components/ui/newsletter-4.tsx"
    }
  ],
  "type": "registry:ui"
}
