{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "action-drawer",
  "title": "Drawer",
  "description": "A mobile-friendly drawer wrapper with title, description, content, and footer actions.",
  "dependencies": [],
  "registryDependencies": [
    "button",
    "drawer",
    "input"
  ],
  "files": [
    {
      "path": "registry/corr/components/action-drawer.tsx",
      "content": "import type { ReactNode } from \"react\"\n\nimport { Button } from \"@/components/ui/button\"\nimport {\n  Drawer,\n  DrawerClose,\n  DrawerContent,\n  DrawerDescription,\n  DrawerFooter,\n  DrawerHeader,\n  DrawerTitle,\n  DrawerTrigger,\n} from \"@/components/ui/drawer\"\n\nexport function ActionDrawer({\n  trigger,\n  title,\n  description,\n  children,\n  actionLabel = \"Save\",\n  cancelLabel = \"Cancel\",\n  direction = \"bottom\",\n  onAction,\n}: {\n  trigger: ReactNode\n  title: string\n  description?: string\n  children?: ReactNode\n  actionLabel?: string\n  cancelLabel?: string\n  direction?: \"top\" | \"right\" | \"bottom\" | \"left\"\n  onAction?: () => void\n}) {\n  return (\n    <Drawer direction={direction}>\n      <DrawerTrigger asChild>{trigger}</DrawerTrigger>\n      <DrawerContent>\n        <div className=\"mx-auto w-full max-w-md group-data-[vaul-drawer-direction=left]/drawer-content:mx-0 group-data-[vaul-drawer-direction=right]/drawer-content:mx-0\">\n          <DrawerHeader>\n            <DrawerTitle>{title}</DrawerTitle>\n            {description ? (\n              <DrawerDescription>{description}</DrawerDescription>\n            ) : null}\n          </DrawerHeader>\n          {children ? <div className=\"px-4 text-sm\">{children}</div> : null}\n          <DrawerFooter>\n            <DrawerClose asChild>\n              <Button onClick={onAction}>{actionLabel}</Button>\n            </DrawerClose>\n            <DrawerClose asChild>\n              <Button variant=\"outline\">{cancelLabel}</Button>\n            </DrawerClose>\n          </DrawerFooter>\n        </div>\n      </DrawerContent>\n    </Drawer>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}