{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "newsletter-5",
  "dependencies": [
    "lucide-react",
    "react-icons"
  ],
  "registryDependencies": [
    "badge",
    "button",
    "card",
    "input",
    "utils"
  ],
  "files": [
    {
      "path": "src/components/watermelon-ui/newsletter-5.tsx",
      "content": "import { useId, useState, type FormEvent } from \"react\";\nimport { RiCheckboxCircleFill, RiMailSendFill } from \"react-icons/ri\";\nimport { cn } from \"@/lib/utils\";\nimport { Badge } from \"@/components/ui/badge\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardContent } from \"@/components/ui/card\";\nimport { Input } from \"@/components/ui/input\";\nimport { FaArrowRight } from \"react-icons/fa6\";\n\nexport interface NewsletterMetric {\n  label: string;\n  value: string;\n}\n\nexport interface Newsletter5Props {\n  eyebrow?: string;\n  title?: string;\n  description?: string;\n  placeholder?: string;\n  buttonText?: string;\n  reassurance?: string;\n  metrics?: NewsletterMetric[];\n  onSubscribe?: (email: string) => void;\n  className?: string;\n}\n\nfunction BackgroundGrid() {\n  return (\n    <div className=\"mask-radial-from-muted absolute inset-0 z-0 overflow-hidden rounded-4xl mask-radial-to-transparent mask-radial-at-center mask-size-[300px]\">\n      <div className=\"grid h-full w-full grid-cols-12 grid-rows-6\">\n        {Array.from({ length: 1000 }).map((_, index) => (\n          <div\n            key={index}\n            className={cn(\n              \"border-border/50 bg-background/90 hover:bg-primary/20 aspect-square border transition-colors duration-300\",\n              index % 7 === 0 && \"bg-primary/10\",\n              index % 17 === 0 && \"bg-background/80\",\n            )}\n          />\n        ))}\n      </div>\n    </div>\n  );\n}\n\nexport default function Newsletter5({\n  eyebrow = \"Signal Dispatch\",\n  title = \"One useful product letter every Friday\",\n  description = \"A concise read on launches, retention loops, design systems, and the small interface choices that make teams move with more clarity.\",\n  placeholder = \"you@company.com\",\n  buttonText = \"Subscribe\",\n  reassurance = \"No spam, no daily drip campaigns, and no sponsored clutter.\",\n  onSubscribe,\n  className,\n}: Newsletter5Props) {\n  const [email, setEmail] = useState(\"\");\n  const inputId = useId();\n\n  const handleSubmit = (event: FormEvent<HTMLFormElement>) => {\n    event.preventDefault();\n    onSubscribe?.(email);\n    setEmail(\"\");\n  };\n\n  return (\n    <section\n      className={cn(\n        \"bg-background flex items-center justify-center p-4 sm:p-6 md:p-8\",\n        className,\n      )}\n    >\n      <Card className=\"border-border bg-muted relative w-full max-w-5xl overflow-hidden rounded-4xl px-4 py-6 shadow-[inset_0_10px_20px_10px_rgba(255,255,255,0.7),inset_0_-10px_20px_10px_rgba(0,0,0,0.05)] sm:px-8 lg:px-14 dark:shadow-[inset_0_-10px_20px_0_rgba(0,0,0,0.1),inset_0_10px_20px_0_rgba(255,255,255,0.05)]\">\n        <BackgroundGrid />\n\n        <CardContent className=\"pointer-events-none relative z-10 grid min-h-96 grid-cols-1 gap-10 p-0 md:grid-cols-5 md:items-center\">\n          <div className=\"flex max-w-2xl flex-col justify-center gap-7 text-center md:col-span-3 md:text-left\">\n            <div className=\"space-y-2\">\n              <Badge\n                variant=\"outline\"\n                className=\"bg-background/70 mx-auto h-9 w-fit gap-2 rounded-none border-none px-3 text-sm font-semibold backdrop-blur-2xl md:mx-0\"\n              >\n                <RiMailSendFill className=\"text-primary size-5\" />\n                {eyebrow}\n              </Badge>\n\n              <div className=\"space-y-4\">\n                <h2 className=\"text-foreground text-4xl font-bold tracking-tight text-balance sm:text-5xl lg:text-6xl\">\n                  {title}\n                </h2>\n                <p className=\"text-muted-foreground text-base leading-relaxed text-pretty sm:text-lg\">\n                  {description}\n                </p>\n              </div>\n            </div>\n\n            <form\n              className=\"pointer-events-auto mx-auto w-full max-w-xl space-y-3 md:mx-0\"\n              onSubmit={handleSubmit}\n            >\n              <label htmlFor={inputId} className=\"sr-only\">\n                Email address\n              </label>\n              <div className=\"bg-background/70 flex flex-col items-center gap-0 rounded-none shadow-sm backdrop-blur-2xl sm:flex-row sm:gap-2\">\n                <Input\n                  id={inputId}\n                  type=\"email\"\n                  value={email}\n                  onChange={(event) => setEmail(event.target.value)}\n                  placeholder={placeholder}\n                  required\n                  className=\"h-12 rounded-none border-0 bg-transparent px-4 text-base shadow-none focus-visible:ring-0\"\n                />\n                <Button\n                  type=\"submit\"\n                  size=\"lg\"\n                  className=\"group mr-1 h-10 w-full shrink-0 rounded-none px-5 font-semibold shadow-[0px_0px_4px_1px_rgba(0,0,0,0.05),inset_0_0px_4px_1px_rgba(255,255,255,0.45),inset_0_1px_0px_0px_rgba(255,255,255,0.35)] transition-transform duration-200 active:scale-[0.96] sm:w-auto\"\n                >\n                  {buttonText}\n                  <FaArrowRight className=\"h-4 w-4 transition-transform duration-200 group-hover:translate-x-1\" />\n                </Button>\n              </div>\n\n              <p className=\"text-muted-foreground flex items-start gap-2 text-left text-sm leading-relaxed\">\n                <RiCheckboxCircleFill className=\"text-primary mt-0.5 h-4 w-4 shrink-0\" />\n                <span>{reassurance}</span>\n              </p>\n            </form>\n          </div>\n        </CardContent>\n      </Card>\n    </section>\n  );\n}\n",
      "type": "registry:ui",
      "target": "components/ui/newsletter-5.tsx"
    }
  ],
  "type": "registry:ui"
}
