{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "extends": "none",
  "name": "drawer-nested-example",
  "title": "Drawer Nested",
  "description": "drawer-nested-example",
  "dependencies": [
    "react-aria-components",
    "sonner"
  ],
  "registryDependencies": [
    "https://intentui.com/r/button",
    "https://intentui.com/r/drawer",
    "https://intentui.com/r/field",
    "https://intentui.com/r/text-field",
    "https://intentui.com/r/textarea"
  ],
  "files": [
    {
      "path": "src/components/examples/overlays/drawer/drawer-nested-example.tsx",
      "content": "'use client'\n\nimport { useState } from 'react'\nimport { Form } from 'react-aria-components/Form'\nimport { toast } from 'sonner'\nimport { Button } from '@/components/ui/button'\nimport {\n  Drawer,\n  DrawerBody,\n  DrawerClose,\n  DrawerContent,\n  DrawerDescription,\n  DrawerFooter,\n  DrawerHeader,\n  DrawerTitle,\n} from '@/components/ui/drawer'\nimport { FieldError, Label } from '@/components/ui/field'\nimport { TextField } from '@/components/ui/text-field'\nimport { Textarea } from '@/components/ui/textarea'\n\nexport default function DrawerNestedDemo() {\n  const [isRegistrationDrawerOpen, setIsRegistrationDrawerOpen] = useState(false)\n  const [isProfileSetupDrawerOpen, setIsProfileSetupDrawerOpen] = useState(false)\n  const [isTyping, setIsTyping] = useState(false)\n\n  return (\n    <>\n      <Button intent=\"outline\" onPress={() => setIsRegistrationDrawerOpen(true)}>\n        Register\n      </Button>\n\n      <Drawer\n        isOpen={isRegistrationDrawerOpen}\n        onOpenChange={() => setIsRegistrationDrawerOpen(false)}\n      >\n        <DrawerContent>\n          <DrawerHeader>\n            <DrawerTitle>Confirm Registration</DrawerTitle>\n            <DrawerDescription>Please confirm your registration details.</DrawerDescription>\n          </DrawerHeader>\n          <DrawerFooter>\n            <DrawerClose>Cancel</DrawerClose>\n            <Button\n              onPress={() => {\n                setIsProfileSetupDrawerOpen(true)\n              }}\n            >\n              Confirm\n            </Button>\n          </DrawerFooter>\n        </DrawerContent>\n      </Drawer>\n\n      <Drawer\n        isOpen={isProfileSetupDrawerOpen}\n        onOpenChange={(isOpen) => {\n          if (!isOpen && isTyping)\n            toast('Profile setup incomplete', {\n              position: 'top-center',\n            })\n          setIsProfileSetupDrawerOpen(isOpen)\n        }}\n      >\n        <DrawerContent>\n          <DrawerHeader>\n            <DrawerTitle>Set Up Your Profile</DrawerTitle>\n            <DrawerDescription>\n              We need a bit more information before you can get started.\n            </DrawerDescription>\n          </DrawerHeader>\n          <Form\n            onSubmit={(e) => {\n              e.preventDefault()\n              toast.success('Profile setup complete', {\n                position: 'top-center',\n              })\n              setIsProfileSetupDrawerOpen(false)\n              setIsRegistrationDrawerOpen(false)\n            }}\n          >\n            <DrawerBody className=\"space-y-4\">\n              <TextField isRequired>\n                <Label>Bio</Label>\n                <Textarea\n                  placeholder=\"Tell us something about yourself\"\n                  onInput={() => setIsTyping(true)}\n                />\n                <FieldError />\n              </TextField>\n            </DrawerBody>\n            <DrawerFooter>\n              <DrawerClose>Skip for now</DrawerClose>\n              <Button type=\"submit\">Complete Setup</Button>\n            </DrawerFooter>\n          </Form>\n        </DrawerContent>\n      </Drawer>\n    </>\n  )\n}\n",
      "type": "registry:page",
      "target": "app/drawer-nested-example/page.tsx"
    }
  ],
  "type": "registry:page"
}