{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "error-500",
  "title": "500 Server Error",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-react/blocks/error-500/Error500.tsx",
      "content": "'use client'\n\nimport { LifeBuoy, RefreshCcw } from 'lucide-react'\nimport { cn } from '@/lib/utils'\nimport { Button } from '@/components/ui/button'\n\nexport interface Error500Props {\n  code?: string\n  title?: string\n  description?: string\n  /** Replaces the HTTP response panel. Pass `''` to hide art entirely. */\n  image?: string\n  imageAlt?: string\n  primaryLabel?: string\n  secondaryLabel?: string\n  tertiaryLabel?: string\n  primaryHref?: string\n  secondaryHref?: string\n  tertiaryHref?: string\n  showPrimary?: boolean\n  showSecondary?: boolean\n  showTertiary?: boolean\n  primaryDisabled?: boolean\n  secondaryDisabled?: boolean\n  tertiaryDisabled?: boolean\n  onPrimary?: () => void\n  onSecondary?: () => void\n  onTertiary?: () => void\n  /** `'page'` fills the viewport; `'contained'` fits a preview or nested panel. */\n  layout?: 'page' | 'contained'\n  className?: string\n}\n\nconst copy = (fallback: string, override?: string) => (override === undefined ? fallback : override)\n\nexport function Error500({\n  code,\n  title,\n  description,\n  image = '/illustrations/error-500.jpg',\n  imageAlt = '',\n  primaryLabel,\n  secondaryLabel,\n  tertiaryLabel,\n  primaryHref,\n  secondaryHref,\n  tertiaryHref,\n  showPrimary = true,\n  showSecondary = true,\n  showTertiary = true,\n  primaryDisabled = false,\n  secondaryDisabled = false,\n  tertiaryDisabled = false,\n  onPrimary,\n  onSecondary,\n  onTertiary,\n  layout = 'page',\n  className,\n}: Error500Props) {\n  const codeText = copy('500', code)\n  const titleText = copy('Something went wrong', title)\n  const descriptionText = copy(\n    'We hit an unexpected error on our side. Try again in a moment — if it keeps happening, our team is on it.',\n    description,\n  )\n  const primaryText = copy('Try again', primaryLabel)\n  const secondaryText = copy('Back to home', secondaryLabel)\n  const tertiaryText = copy('Contact support', tertiaryLabel)\n\n  return (\n    <section\n      data-slot=\"error-500\"\n      data-layout={layout}\n      className={cn(\n        'bg-background relative flex items-center overflow-hidden px-6 py-16',\n        layout === 'page' ? 'min-h-svh' : 'min-h-[28rem]',\n        className,\n      )}\n    >\n      <div className=\"mx-auto grid w-full max-w-5xl items-center gap-10 lg:grid-cols-2 lg:gap-16\">\n        <div>\n          {codeText ? <p className=\"text-muted-foreground text-sm font-medium\">HTTP {codeText}</p> : null}\n          {codeText ? <p className=\"mt-3 text-6xl font-semibold tracking-tighter sm:text-7xl\">{codeText}</p> : null}\n          <h1 className=\"mt-3 text-2xl font-semibold tracking-tight sm:text-3xl\">{titleText}</h1>\n          {descriptionText ? <p className=\"text-muted-foreground mt-4 max-w-md text-base\">{descriptionText}</p> : null}\n          {showPrimary || showSecondary || showTertiary ? (\n            <div className=\"mt-8 flex flex-wrap items-center gap-3\">\n              {showPrimary ? (\n                primaryHref ? (\n                  <Button asChild size=\"lg\" disabled={primaryDisabled}>\n                    <a href={primaryHref} onClick={onPrimary}>\n                      <RefreshCcw />\n                      {primaryText}\n                    </a>\n                  </Button>\n                ) : (\n                  <Button size=\"lg\" disabled={primaryDisabled} onClick={onPrimary}>\n                    <RefreshCcw />\n                    {primaryText}\n                  </Button>\n                )\n              ) : null}\n              {showSecondary ? (\n                secondaryHref ? (\n                  <Button asChild size=\"lg\" variant=\"outline\" disabled={secondaryDisabled}>\n                    <a href={secondaryHref} onClick={onSecondary}>\n                      {secondaryText}\n                    </a>\n                  </Button>\n                ) : (\n                  <Button size=\"lg\" variant=\"outline\" disabled={secondaryDisabled} onClick={onSecondary}>\n                    {secondaryText}\n                  </Button>\n                )\n              ) : null}\n              {showTertiary ? (\n                tertiaryHref ? (\n                  <Button asChild size=\"lg\" variant=\"ghost\" disabled={tertiaryDisabled}>\n                    <a href={tertiaryHref} onClick={onTertiary}>\n                      {tertiaryText}\n                      <LifeBuoy />\n                    </a>\n                  </Button>\n                ) : (\n                  <Button size=\"lg\" variant=\"ghost\" disabled={tertiaryDisabled} onClick={onTertiary}>\n                    {tertiaryText}\n                    <LifeBuoy />\n                  </Button>\n                )\n              ) : null}\n            </div>\n          ) : null}\n        </div>\n        {image ? (\n          <div className=\"border-border bg-muted overflow-hidden rounded-xl border\">\n            <img src={image} alt={imageAlt} className=\"aspect-[4/3] w-full object-cover\" />\n          </div>\n        ) : image === undefined ? (\n          <div className=\"border-border bg-muted/40 overflow-hidden rounded-xl border font-mono\" aria-hidden=\"true\">\n            <div className=\"border-border text-muted-foreground truncate border-b px-3 py-2 text-xs\">\n              POST /api/v1/invoices\n            </div>\n            <div className=\"space-y-1 p-4 text-xs leading-relaxed\">\n              <p>\n                <span className=\"text-muted-foreground\">HTTP/1.1</span>{' '}\n                <span className=\"text-destructive\">{codeText || '500'} Internal Server Error</span>\n              </p>\n              <p className=\"text-muted-foreground\">error: ECONNRESET</p>\n              <p className=\"text-muted-foreground\">at: Worker.run:142</p>\n              <p className=\"text-muted-foreground\">x-request-id: req_8f3c2a</p>\n            </div>\n          </div>\n        ) : null}\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:block",
      "target": "~/components/blocks/Error500.tsx"
    }
  ],
  "dependencies": [
    "lucide-react"
  ],
  "devDependencies": [],
  "registryDependencies": [
    "https://uipkge.dev/r/react/button.json"
  ],
  "description": "Full-page 500 with an isometric crashed-server illustration, HTTP code, headline, and Try again + Back to home + Contact support. Prop-driven: pass title, description, image, action labels, hrefs, and layout (`page` | `contained`). Pass `image=\"\"` to hide the art.",
  "categories": [
    "layout",
    "feedback"
  ],
  "deprecated": true,
  "replacedBy": "error-page"
}