{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "error-state",
  "type": "registry:ui",
  "title": "Error state",
  "description": "React error state panel with an alert role, a title, explanation and an optional Try again button that calls your retry handler. For failed fetches.",
  "dependencies": [],
  "registryDependencies": [
    "https://ui.minidev.pro/r/button.json",
    "utils"
  ],
  "files": [
    {
      "path": "registry/ui/error-state.tsx",
      "type": "registry:ui",
      "target": "components/ui/error-state.tsx",
      "content": "\"use client\"\nimport * as React from \"react\"\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\n\nfunction ErrorState({\n  title = \"Something went wrong\",\n  description = \"Try again in a moment.\",\n  onRetry,\n  className,\n}: {\n  title?: string\n  description?: string\n  onRetry?: () => void\n  className?: string\n}) {\n  return (\n    <div\n      data-slot=\"error-state\"\n      role=\"alert\"\n      className={cn(\n        \"flex flex-col items-center justify-center rounded-xl border border-border bg-surface px-6 py-10 text-center shadow-highlight\",\n        className\n      )}\n    >\n      <h3 className=\"text-base font-medium text-fg\">{title}</h3>\n      <p className=\"mt-2 max-w-sm text-sm leading-[1.55] text-fg\">{description}</p>\n      {onRetry ? (\n        <Button className=\"mt-5\" size=\"sm\" onClick={onRetry}>\n          Try again\n        </Button>\n      ) : null}\n    </div>\n  )\n}\nexport { ErrorState }\n"
    }
  ]
}
