{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "pricing-form",
  "title": "Pricing Form",
  "description": "Pricing plan selection with radio card variants.",
  "registryDependencies": [
    "@buzzform/radio",
    "card",
    "sonner"
  ],
  "files": [
    {
      "path": "registry/shadcn/examples/pricing-form.tsx",
      "content": "\"use client\";\n\nimport { toast } from \"sonner\";\nimport { defineSchema, type InferType } from \"@buildnbuzz/form-react\";\nimport {\n  Form,\n  FormContent,\n  FormFields,\n  FormSubmit,\n} from \"@/registry/shadcn/form\";\nimport {\n  Card,\n  CardContent,\n  CardDescription,\n  CardHeader,\n  CardTitle,\n} from \"@/components/ui/card\";\n\n// Pricing plan selection with card variant\nconst pricingSchema = defineSchema({\n  fields: [\n    {\n      type: \"radio\",\n      name: \"plan\",\n      label: \"Select your plan\",\n      required: true,\n      options: [\n        {\n          value: \"free\",\n          label: \"Free\",\n          description: \"For personal projects and experiments\",\n        },\n        {\n          value: \"pro\",\n          label: \"Pro\",\n          description: \"For professional developers and small teams\",\n        },\n        {\n          value: \"enterprise\",\n          label: \"Enterprise\",\n          description: \"For large organizations with custom needs\",\n        },\n      ],\n      ui: {\n        variant: \"card\",\n        card: { size: \"md\", bordered: true },\n      },\n    },\n    {\n      type: \"radio\",\n      name: \"billing\",\n      label: \"Billing cycle\",\n      required: true,\n      options: [\"Monthly\", \"Yearly\"],\n      defaultValue: \"Monthly\",\n      ui: { direction: \"horizontal\" },\n    },\n  ],\n});\n\ntype PricingSchema = InferType<typeof pricingSchema.fields>;\n\nexport default function PricingFormCard() {\n  const handleSubmit = async ({ value }: { value: unknown }) => {\n    const data = value as PricingSchema;\n    await new Promise((resolve) => setTimeout(resolve, 500));\n    toast(\"Plan selected!\", {\n      description: (\n        <pre className=\"mt-2 max-h-48 overflow-auto rounded-md bg-muted text-muted-foreground p-3 text-xs\">\n          <code>{JSON.stringify(data, null, 2)}</code>\n        </pre>\n      ),\n    });\n  };\n\n  return (\n    <Card className=\"w-full max-w-md\">\n      <CardHeader>\n        <CardTitle>Choose a Plan</CardTitle>\n        <CardDescription>\n          Select the plan that best fits your needs.\n        </CardDescription>\n      </CardHeader>\n      <CardContent>\n        <Form schema={pricingSchema} onSubmit={handleSubmit}>\n          <FormContent className=\"space-y-6\">\n            <FormFields />\n            <FormSubmit className=\"w-full\">Continue</FormSubmit>\n          </FormContent>\n        </Form>\n      </CardContent>\n    </Card>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/buzzform/examples/pricing-form.tsx"
    }
  ],
  "type": "registry:block"
}