{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "dialog-21",
  "title": "Nested dialog",
  "description": "Dialog stacked inside another dialog, e.g. avatar picker from profile.",
  "dependencies": [],
  "registryDependencies": [
    "dialog",
    "button",
    "field",
    "input"
  ],
  "files": [
    {
      "path": "registry/patterns/dialog/dialog-21.tsx",
      "content": "'use client'\n\nimport { Button } from '@/components/ui/button'\nimport {\n  Dialog,\n  DialogClose,\n  DialogContent,\n  DialogDescription,\n  DialogFooter,\n  DialogHeader,\n  DialogTitle,\n  DialogTrigger,\n} from '@/components/ui/dialog'\nimport { Field, FieldGroup, FieldLabel } from '@/components/ui/field'\nimport { Input } from '@/components/ui/input'\n\nexport function Dialog21() {\n  return (\n    <Dialog>\n      <DialogTrigger\n        render={<Button variant=\"outline\">Nested dialog</Button>}\n      />\n      <DialogContent className=\"sm:max-w-md\">\n        <DialogHeader>\n          <DialogTitle>Edit profile</DialogTitle>\n          <DialogDescription>\n            Open a nested dialog for a related action without closing this one.\n          </DialogDescription>\n        </DialogHeader>\n        <FieldGroup>\n          <Field>\n            <FieldLabel htmlFor=\"dialog-21-name\">Display name</FieldLabel>\n            <Input id=\"dialog-21-name\" defaultValue=\"Felipe Menezes\" />\n          </Field>\n        </FieldGroup>\n        <DialogFooter className=\"sm:justify-between\">\n          <Dialog>\n            <DialogTrigger\n              render={\n                <Button type=\"button\" variant=\"outline\">\n                  Change avatar\n                </Button>\n              }\n            />\n            <DialogContent className=\"sm:max-w-sm\">\n              <DialogHeader>\n                <DialogTitle>Change avatar</DialogTitle>\n                <DialogDescription>\n                  Nested dialog stacks above the parent. Upload a new image or\n                  remove the current one.\n                </DialogDescription>\n              </DialogHeader>\n              <div className=\"bg-muted flex h-24 items-center justify-center rounded-lg border border-dashed\">\n                <span className=\"text-muted-foreground text-sm\">\n                  Drop image here\n                </span>\n              </div>\n              <DialogFooter>\n                <DialogClose\n                  render={\n                    <Button type=\"button\" variant=\"outline\">\n                      Cancel\n                    </Button>\n                  }\n                />\n                <Button type=\"button\">Save avatar</Button>\n              </DialogFooter>\n            </DialogContent>\n          </Dialog>\n          <div className=\"flex gap-2\">\n            <DialogClose\n              render={\n                <Button type=\"button\" variant=\"outline\">\n                  Close\n                </Button>\n              }\n            />\n            <Button type=\"button\">Save profile</Button>\n          </div>\n        </DialogFooter>\n      </DialogContent>\n    </Dialog>\n  )\n}\n",
      "type": "registry:component",
      "target": "components/flx/patterns/dialog/dialog-21.tsx"
    }
  ],
  "type": "registry:block"
}