{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "extends": "none",
  "name": "dialog-nested-example",
  "title": "Dialog Nested",
  "description": "dialog-nested-example",
  "dependencies": [
    "react-aria-components",
    "sonner"
  ],
  "registryDependencies": [
    "https://intentui.com/r/button",
    "https://intentui.com/r/field",
    "https://intentui.com/r/dialog",
    "https://intentui.com/r/text-field",
    "https://intentui.com/r/textarea"
  ],
  "files": [
    {
      "path": "src/components/examples/overlays/dialog/dialog-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 { Label } from \"@/components/ui/field\"\nimport {\n  DialogBody,\n  DialogClose,\n  Dialog,\n  DialogDescription,\n  DialogFooter,\n  DialogHeader,\n  DialogTitle,\n} from \"@/components/ui/dialog\"\nimport { TextField } from \"@/components/ui/text-field\"\nimport { Textarea } from \"@/components/ui/textarea\"\n\nexport default function DialogNestedDemo() {\n  const [isRegistrationDialogOpen, setIsRegistrationDialogOpen] = useState(false)\n  const [isProfileSetupDialogOpen, setIsProfileSetupDialogOpen] = useState(false)\n  const [isTyping, setIsTyping] = useState(false)\n\n  return (\n    <>\n      <Button intent=\"outline\" onPress={() => setIsRegistrationDialogOpen(true)}>\n        Register\n      </Button>\n\n      <Dialog\n        isOpen={isRegistrationDialogOpen}\n        onOpenChange={() => setIsRegistrationDialogOpen(false)}\n        aria-label=\"Confirm Registration\"\n      >\n        <DialogHeader>\n          <DialogTitle>Confirm Registration</DialogTitle>\n          <DialogDescription>Please confirm your registration details.</DialogDescription>\n        </DialogHeader>\n        <DialogFooter>\n          <DialogClose>Cancel</DialogClose>\n          <Button\n            onPress={() => {\n              setIsProfileSetupDialogOpen(true)\n            }}\n          >\n            Confirm\n          </Button>\n        </DialogFooter>\n      </Dialog>\n\n      <Dialog\n        isOpen={isProfileSetupDialogOpen}\n        onOpenChange={(isOpen) => {\n          if (!isOpen && isTyping) {\n            toast(\"Profile setup incomplete\")\n          }\n          setIsProfileSetupDialogOpen(isOpen)\n        }}\n        aria-label=\"Profile Setup\"\n      >\n        <DialogHeader>\n          <DialogTitle>Set Up Your Profile</DialogTitle>\n          <DialogDescription>\n            We need a bit more information before you can get started.\n          </DialogDescription>\n        </DialogHeader>\n        <Form\n          onSubmit={(e) => {\n            e.preventDefault()\n            toast.success(\"Profile setup complete\")\n            setIsProfileSetupDialogOpen(false)\n            setIsRegistrationDialogOpen(false)\n          }}\n        >\n          <DialogBody className=\"space-y-4\">\n            <TextField>\n              <Label>Bio</Label>\n              <Textarea\n                placeholder=\"Tell us something about yourself\"\n                onInput={() => setIsTyping(true)}\n              />\n            </TextField>\n          </DialogBody>\n          <DialogFooter>\n            <DialogClose>Skip for now</DialogClose>\n            <Button type=\"submit\">Complete Setup</Button>\n          </DialogFooter>\n        </Form>\n      </Dialog>\n    </>\n  )\n}\n",
      "type": "registry:page",
      "target": "app/dialog-nested-example/page.tsx"
    }
  ],
  "type": "registry:page"
}