{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "error-notice",
  "registryDependencies": [
    "utils",
    "https://turnui.xyz/r/turn-button.json"
  ],
  "files": [
    {
      "path": "src/registry/ui/error-notice.tsx",
      "content": "import * as React from \"react\";\nimport { cn } from \"@/lib/utils\";\nimport { Button } from \"./turn-button\";\n\n/** A failed reply, with an optional retry. Keep it mounted until the retry produces output so focus is not lost. */\nexport function ErrorNotice({\n  title = \"Something went wrong\",\n  message,\n  onRetry,\n  retrying = false,\n  retryLabel = \"Retry\",\n  className,\n}: {\n  title?: string;\n  /** What happened, in plain words. */\n  message?: React.ReactNode;\n  /** Shows a retry button when set. */\n  onRetry?: () => void;\n  /** Disables the button and shows \"Retrying…\" while the retry is in flight. */\n  retrying?: boolean;\n  retryLabel?: string;\n  className?: string;\n}) {\n  return (\n    <div role=\"alert\" className={cn(\"relative overflow-hidden rounded border bg-muted/20 py-3 pl-4 pr-3\", className)}>\n      <span aria-hidden className=\"absolute inset-y-0 left-0 w-0.5 bg-red-500\" />\n      <div className=\"font-mono text-[11px] uppercase tracking-wider text-red-700 dark:text-red-400\">Error</div>\n      <div className=\"mt-1.5 text-sm font-medium\">{title}</div>\n      {message && <p className=\"mt-0.5 text-sm text-muted-foreground\">{message}</p>}\n      {onRetry && (\n        <Button size=\"sm\" variant=\"outline\" className=\"mt-3\" onClick={onRetry} disabled={retrying} focusableWhenDisabled>\n          {retrying ? \"Retrying…\" : retryLabel}\n        </Button>\n      )}\n    </div>\n  );\n}\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}