{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "tailwind-alertdialog",
  "type": "registry:ui",
  "title": "AlertDialog",
  "dependencies": [
    "lucide-react",
    "react",
    "react-aria",
    "react-aria-components",
    "tailwindcss-react-aria-components",
    "tw-animate-css"
  ],
  "registryDependencies": [
    "https://react-aria.adobe.com/registry/tailwind-button.json",
    "https://react-aria.adobe.com/registry/tailwind-dialog.json"
  ],
  "files": [
    {
      "path": "components/ui/AlertDialog.tsx",
      "type": "registry:ui",
      "content": "'use client';\nimport {AlertCircleIcon, InfoIcon} from 'lucide-react';\nimport React, {type ReactNode} from 'react';\nimport {chain} from 'react-aria/chain';\nimport {type DialogProps} from 'react-aria-components/Dialog';\nimport {Heading} from 'react-aria-components/Heading';\nimport {Button} from '@/registry/react-aria/ui/Button';\nimport {Dialog} from '@/registry/react-aria/ui/Dialog';\n\ninterface AlertDialogProps extends Omit<DialogProps, 'children'> {\n  title: string;\n  children: ReactNode;\n  variant?: 'info' | 'destructive';\n  actionLabel: string;\n  cancelLabel?: string;\n  onAction?: () => void;\n}\n\nexport function AlertDialog({\n  title,\n  variant,\n  cancelLabel,\n  actionLabel,\n  onAction,\n  children,\n  ...props\n}: AlertDialogProps) {\n  return (\n    <Dialog role=\"alertdialog\" {...props}>\n      {({close}) => (\n        <>\n          <Heading slot=\"title\" className=\"text-xl font-semibold leading-6 my-0\">\n            {title}\n          </Heading>\n          <div\n            className={`w-6 h-6 absolute right-6 top-6 stroke-2 ${variant === 'destructive' ? 'text-red-500' : 'text-blue-500'}`}>\n            {variant === 'destructive' ? <AlertCircleIcon aria-hidden /> : <InfoIcon aria-hidden />}\n          </div>\n          <p className=\"mt-3 text-neutral-500 dark:text-neutral-400\">{children}</p>\n          <div className=\"mt-6 flex justify-end gap-2\">\n            <Button variant=\"secondary\" onPress={close}>\n              {cancelLabel || 'Cancel'}\n            </Button>\n            <Button\n              variant={variant === 'destructive' ? 'destructive' : 'primary'}\n              autoFocus\n              onPress={chain(onAction, close)}>\n              {actionLabel}\n            </Button>\n          </div>\n        </>\n      )}\n    </Dialog>\n  );\n}\n"
    }
  ],
  "css": {
    "@plugin \"tailwindcss-react-aria-components\"": {},
    "@import \"tw-animate-css\"": {}
  }
}
