{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "checkout-form",
  "title": "Checkout Form",
  "description": "Multi-step checkout process with tabbed navigation.",
  "registryDependencies": [
    "@buzzform/tabs",
    "@buzzform/text",
    "@buzzform/select",
    "@buzzform/row",
    "card",
    "sonner"
  ],
  "files": [
    {
      "path": "registry/shadcn/examples/checkout-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 lineVariantSchema = defineSchema({\n  fields: [\n    {\n      type: \"tabs\",\n      ui: {\n        variant: \"line\",\n        defaultTab: \"shipping\",\n        spacing: \"lg\",\n      },\n      tabs: [\n        {\n          name: \"billing\",\n          label: \"Billing\",\n\n          fields: [\n            {\n              type: \"text\",\n              name: \"cardName\",\n              label: \"Name on Card\",\n              required: true,\n            },\n            {\n              type: \"text\",\n              name: \"cardNumber\",\n              label: \"Card Number\",\n              placeholder: \"1234 5678 9012 3456\",\n              required: true,\n            },\n            {\n              type: \"row\",\n              fields: [\n                {\n                  type: \"text\",\n                  name: \"expiry\",\n                  label: \"Expiry Date\",\n                  placeholder: \"MM/YY\",\n                  required: true,\n                },\n                {\n                  type: \"text\",\n                  name: \"cvv\",\n                  label: \"CVV\",\n                  placeholder: \"123\",\n                  required: true,\n                },\n              ],\n            },\n          ],\n        },\n        {\n          name: \"shipping\",\n          label: \"Shipping\",\n\n          fields: [\n            {\n              type: \"text\",\n              name: \"address\",\n              label: \"Street Address\",\n              required: true,\n            },\n            {\n              type: \"row\",\n              fields: [\n                {\n                  type: \"text\",\n                  name: \"city\",\n                  label: \"City\",\n                  required: true,\n                },\n                {\n                  type: \"text\",\n                  name: \"zip\",\n                  label: \"ZIP Code\",\n                  required: true,\n                },\n              ],\n            },\n            {\n              type: \"select\",\n              name: \"country\",\n              label: \"Country\",\n              options: [\n                \"United States\",\n                \"Canada\",\n                \"United Kingdom\",\n                \"Australia\",\n              ],\n              required: true,\n            },\n          ],\n        },\n      ],\n    },\n  ],\n});\n\ntype LineVariantSchema = InferType<typeof lineVariantSchema.fields>;\n\nexport default function CheckoutForm() {\n  return (\n    <Card>\n      <CardHeader>\n        <CardTitle>Checkout</CardTitle>\n        <CardDescription>\n          Billing and shipping in a streamlined checkout flow\n        </CardDescription>\n      </CardHeader>\n      <CardContent>\n        <Form\n          schema={lineVariantSchema}\n          onSubmit={async ({ value }) => {\n            const data = value as LineVariantSchema;\n            await new Promise((r) => setTimeout(r, 1000));\n            toast(\"Order placed!\", {\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\">Complete Order</FormSubmit>\n          </FormContent>\n        </Form>\n      </CardContent>\n    </Card>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/buzzform/examples/checkout-form.tsx"
    }
  ],
  "type": "registry:block"
}