{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "booking-form",
  "title": "Booking Form",
  "description": "Hotel booking form with date pickers, number fields, and time selection.",
  "registryDependencies": [
    "@buzzform/date",
    "@buzzform/number",
    "@buzzform/select",
    "@buzzform/textarea",
    "@buzzform/row",
    "card",
    "sonner"
  ],
  "files": [
    {
      "path": "registry/shadcn/examples/booking-form.tsx",
      "content": "\"use client\";\n\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\";\nimport { toast } from \"sonner\";\nimport { defineSchema, type InferType } from \"@buildnbuzz/form-react\";\n\n// Hotel booking form with date pickers and time selection\nconst bookingSchema = defineSchema({\n  fields: [\n    {\n      type: \"row\",\n      ui: { gap: 16, responsive: true },\n      fields: [\n        {\n          type: \"date\",\n          name: \"checkIn\",\n          label: \"Check In\",\n          required: true,\n          ui: {\n            presets: true,\n          },\n        },\n        {\n          type: \"date\",\n          name: \"checkOut\",\n          label: \"Check Out\",\n          required: true,\n        },\n      ],\n    },\n    {\n      type: \"date\",\n      withTime: true,\n      name: \"arrivalTime\",\n      label: \"Expected Arrival Time\",\n      description: \"Let us know when to expect you\",\n      required: true,\n      ui: {\n        timePicker: {\n          interval: 30,\n          use24hr: false,\n        },\n      },\n    },\n    {\n      type: \"row\",\n      ui: { gap: 16, responsive: true },\n      fields: [\n        {\n          type: \"number\",\n          name: \"adults\",\n          label: \"Adults\",\n          required: true,\n          min: 1,\n          max: 6,\n          defaultValue: 2,\n        },\n        {\n          type: \"number\",\n          name: \"children\",\n          label: \"Children\",\n          min: 0,\n          max: 4,\n          defaultValue: 0,\n        },\n      ],\n    },\n    {\n      type: \"select\",\n      name: \"roomType\",\n      label: \"Room Type\",\n      required: true,\n      options: [\n        { value: \"standard\", label: \"Standard Room\" },\n        { value: \"deluxe\", label: \"Deluxe Room\" },\n        { value: \"suite\", label: \"Executive Suite\" },\n        { value: \"penthouse\", label: \"Penthouse\" },\n      ],\n      defaultValue: \"standard\",\n    },\n    {\n      type: \"textarea\",\n      name: \"specialRequests\",\n      label: \"Special Requests\",\n      placeholder: \"Any special requests or preferences...\",\n    },\n  ],\n});\n\ntype BookingSchema = InferType<typeof bookingSchema.fields>;\n\nexport default function BookingForm() {\n  return (\n    <Card className=\"w-full max-w-md mx-auto\">\n      <CardHeader>\n        <CardTitle>Book Your Stay</CardTitle>\n        <CardDescription>\n          Date pickers with presets and time selection\n        </CardDescription>\n      </CardHeader>\n      <CardContent>\n        <Form\n          schema={bookingSchema}\n          defaultValues={{\n            checkIn: new Date(),\n            checkOut: new Date(new Date().setDate(new Date().getDate() + 2)),\n            arrivalTime: new Date(),\n            adults: 2,\n            roomType: \"standard\",\n          }}\n          onSubmit={async ({ value }) => {\n            const data = value as BookingSchema;\n            await new Promise((resolve) => setTimeout(resolve, 1000));\n            toast(\"Booking Request Sent!\", {\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 />\n            <div className=\"flex justify-end pt-4\">\n              <FormSubmit>Request Booking</FormSubmit>\n            </div>\n          </FormContent>\n        </Form>\n      </CardContent>\n    </Card>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/buzzform/examples/booking-form.tsx"
    }
  ],
  "type": "registry:block"
}