{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "newsletter-form",
  "description": "Newsletter subscription form with email frequency selection",
  "dependencies": [
    "react-hook-form",
    "@hookform/resolvers",
    "zod",
    "sonner"
  ],
  "registryDependencies": [
    "https://formscn.space/r/button.json",
    "https://formscn.space/r/card.json",
    "https://formscn.space/r/input.json",
    "https://formscn.space/r/label.json",
    "https://formscn.space/r/radio-group.json"
  ],
  "files": [
    {
      "path": "src/registry/default/templates/newsletter-form.tsx",
      "content": "\"use client\";\n\nimport { useForm, Controller } from \"react-hook-form\";\nimport { zodResolver } from \"@hookform/resolvers/zod\";\nimport * as z from \"zod\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardContent, CardDescription, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { Input } from \"@/components/ui/input\";\nimport { Label } from \"@/components/ui/label\";\nimport { toast } from \"sonner\";\nimport {\n  Select,\n  SelectContent,\n  SelectItem,\n  SelectTrigger,\n  SelectValue,\n} from \"@/components/ui/select\";\n\nconst formSchema = z.object({\n  email: z.string().email(\"Invalid email address\").min(1, \"Email Address is required\"),\n  frequency: z.enum([\"daily\", \"weekly\", \"monthly\"]),\n});\n\ntype FormValues = z.infer<typeof formSchema>;\nexport function NewsletterSignupForm() {\n  const form = useForm<FormValues>({\n    resolver: zodResolver(formSchema),\n    defaultValues: {\n      email: \"\",\n      frequency: \"daily\",\n    },\n  });\n\n  const onSubmit = async (data: FormValues) => {\n    console.log(\"Form submitted:\", data);\n    toast.success(\"Form submitted successfully!\");\n  };\n\n  return (\n    <Card className=\"w-full max-w-md mx-auto\">\n      <CardHeader>\n        <CardTitle>Newsletter Signup</CardTitle>\n        <CardDescription>Simple newsletter subscription form</CardDescription>\n      </CardHeader>\n      <CardContent>\n        <form onSubmit={form.handleSubmit(onSubmit)} className=\"space-y-4\">\n          <div className=\"space-y-2\">\n            <Label htmlFor=\"email\">Email Address</Label>\n            <Input\n              id=\"email\"\n              type=\"email\"\n              placeholder=\"john@example.com\"\n              {...form.register(\"email\")}\n            />\n            {form.formState.errors.email && (\n            <p className=\"text-sm text-destructive\">{form.formState.errors.email.message}</p>\n          )}\n          <p className=\"text-sm text-muted-foreground\">We'll never share your email</p>\n          </div>\n\n          <div className=\"space-y-2\">\n            <Label htmlFor=\"frequency\">Email Frequency</Label>\n            <Controller\n              control={form.control}\n              name=\"frequency\"\n              render={({ field }) => (\n                <Select onValueChange={field.onChange} defaultValue={field.value}>\n                  <SelectTrigger id=\"frequency\">\n                    <SelectValue placeholder=\"Select an option\" />\n                  </SelectTrigger>\n                  <SelectContent>\n                    <SelectItem value=\"daily\">Daily</SelectItem>\n                    <SelectItem value=\"weekly\">Weekly</SelectItem>\n                    <SelectItem value=\"monthly\">Monthly</SelectItem>\n                  </SelectContent>\n                </Select>\n              )}\n            />\n            {form.formState.errors.frequency && (\n            <p className=\"text-sm text-destructive\">{form.formState.errors.frequency.message}</p>\n          )}\n          </div>\n\n          <Button type=\"submit\" className=\"w-full\">Submit</Button>\n        </form>\n      </CardContent>\n    </Card>\n  );\n}",
      "type": "registry:block",
      "target": "components/forms/newsletter-form.tsx"
    }
  ],
  "type": "registry:block"
}