{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "error-state",
  "title": "Error state",
  "description": "An error message with a danger panel or compact inline layout, optional Try again with loading state and a copyable reference. Announces the error in place.",
  "dependencies": [
    "lucide-react@1.33.0"
  ],
  "registryDependencies": [
    "@waimakers/utils",
    "@waimakers/theme",
    "@waimakers/empty-state",
    "@waimakers/button",
    "@waimakers/id-token"
  ],
  "files": [
    {
      "path": "src/components/ui/error-state.tsx",
      "content": "import type { ComponentProps, ReactNode } from \"react\";\nimport { CircleAlert } from \"lucide-react\";\nimport { cn } from \"../../lib/utils\";\nimport { Button } from \"./button\";\nimport { EmptyState } from \"./empty-state\";\nimport { IdToken } from \"./id-token\";\n\nfunction ErrorState({\n  title,\n  description,\n  onRetry,\n  reference,\n  retrying = false,\n  variant = \"panel\",\n  className,\n  ...props\n}: Omit<ComponentProps<typeof EmptyState>, \"tone\" | \"icon\" | \"action\" | \"title\"> & {\n  title: ReactNode;\n  onRetry?: (() => void) | undefined;\n  reference?: string;\n  retrying?: boolean;\n  variant?: \"panel\" | \"inline\";\n}) {\n  const retry = onRetry ? (\n    <Button\n      type=\"button\"\n      variant=\"outline\"\n      size={variant === \"inline\" ? \"sm\" : \"default\"}\n      onClick={onRetry}\n      loading={retrying}\n    >\n      Try again\n    </Button>\n  ) : null;\n  if (variant === \"inline\") {\n    return (\n      <div\n        role=\"alert\"\n        data-slot=\"error-state\"\n        data-variant=\"inline\"\n        className={cn(\"flex min-w-0 items-start gap-3 text-sm\", className)}\n        {...props}\n      >\n        <CircleAlert aria-hidden=\"true\" className=\"mt-0.5 size-4 shrink-0 text-danger-text\" />\n        <div className=\"min-w-0 flex-1 space-y-1\">\n          <p className=\"font-medium text-danger-text\">{title}</p>\n          {description && <p className=\"text-muted-foreground\">{description}</p>}\n          {reference && <IdToken value={reference} label=\"Reference\" />}\n        </div>\n        {retry}\n      </div>\n    );\n  }\n  return (\n    <EmptyState\n      role=\"alert\"\n      tone=\"danger\"\n      icon={<CircleAlert aria-hidden=\"true\" />}\n      title={title}\n      description={description}\n      action={\n        onRetry || reference ? (\n          <div className=\"flex flex-col items-center gap-3\">\n            {retry}\n            {reference && <IdToken value={reference} label=\"Reference\" />}\n          </div>\n        ) : undefined\n      }\n      className={className}\n      {...props}\n    />\n  );\n}\nexport { ErrorState };\n",
      "type": "registry:ui",
      "target": "components/ui/error-state.tsx"
    }
  ],
  "type": "registry:ui"
}