{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "coupon-layout-form",
  "title": "Coupon Layout Form",
  "description": "Coupon creation form with row layout and checkbox fields.",
  "registryDependencies": [
    "@buzzform/text",
    "@buzzform/checkbox",
    "@buzzform/row",
    "card",
    "sonner"
  ],
  "files": [
    {
      "path": "registry/shadcn/examples/coupon-layout-form.tsx",
      "content": "\"use client\";\n\nimport { defineSchema, type InferType } from \"@buildnbuzz/form-react\";\nimport { toast } from \"sonner\";\nimport {\n  Card,\n  CardContent,\n  CardDescription,\n  CardHeader,\n  CardTitle,\n} from \"@/components/ui/card\";\nimport {\n  Form,\n  FormContent,\n  FormFields,\n  FormSubmit,\n} from \"@/registry/shadcn/form\";\n\nconst dualActionSchema = defineSchema({\n  fields: [\n    {\n      type: \"row\",\n      ui: { align: \"center\", gap: 4 },\n      fields: [\n        {\n          type: \"text\",\n          name: \"coupon\",\n          label: \"Coupon Code\",\n          placeholder: \"SUMMER20\",\n        },\n        {\n          type: \"checkbox\",\n          name: \"applyAutomatically\",\n          label: \"Apply automatically\",\n        },\n      ],\n    },\n  ],\n});\n\ntype DualActionSchema = InferType<typeof dualActionSchema.fields>;\n\nexport default function CouponLayoutForm() {\n  return (\n    <Card>\n      <CardHeader>\n        <CardTitle>Apply Discount</CardTitle>\n        <CardDescription>\n          Mixed field types aligned in a single row\n        </CardDescription>\n      </CardHeader>\n      <CardContent>\n        <Form\n          schema={dualActionSchema}\n          onSubmit={async ({ value }) => {\n            const data = value as DualActionSchema;\n            await new Promise((r) => setTimeout(r, 1000));\n            toast(\"Coupon applied!\", {\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          <FormContent>\n            <FormFields className=\"space-y-4\" />\n            <FormSubmit className=\"mt-6 w-full\">Apply</FormSubmit>\n          </FormContent>\n        </Form>\n      </CardContent>\n    </Card>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/buzzform/examples/coupon-layout-form.tsx"
    }
  ],
  "type": "registry:block"
}