{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "status-update",
  "type": "registry:component",
  "title": "Status update",
  "description": "Success, info, warning and error confirmations using semantic host tokens.",
  "registryDependencies": [
    "https://mcpblocks.dev/r/host-button.json",
    "https://mcpblocks.dev/r/icons.json"
  ],
  "files": [
    {
      "path": "registry/mcpblocks/components/status-update.tsx",
      "content": "import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { HostButton } from \"@/registry/mcpblocks/ui/host-button\"\nimport { CheckCircleIcon, InfoIcon, ProhibitIcon, WarningIcon } from \"@/registry/mcpblocks/ui/icons\"\n\nexport type StatusTone = \"success\" | \"info\" | \"warning\" | \"danger\"\n\nexport type StatusUpdateProps = Omit<React.ComponentProps<\"div\">, \"title\"> & {\n  tone?: StatusTone\n  title: React.ReactNode\n  description?: React.ReactNode\n  /** One optional follow-up, e.g. \"Undo\" or \"View\". */\n  action?: { label: string; onClick?: () => void }\n}\n\nconst tones: Record<\n  StatusTone,\n  { icon: React.ElementType; chip: string; label: string }\n> = {\n  success: { icon: CheckCircleIcon, chip: \"bg-host-success-bg text-host-success-fg\", label: \"Success\" },\n  info: { icon: InfoIcon, chip: \"bg-host-info-bg text-host-info-fg\", label: \"Info\" },\n  warning: { icon: WarningIcon, chip: \"bg-host-warning-bg text-host-warning-fg\", label: \"Warning\" },\n  danger: { icon: ProhibitIcon, chip: \"bg-host-danger-border/15 text-host-danger-fg\", label: \"Error\" },\n}\n\n/** Confirms the result of an action, using the host's semantic colors. */\nexport function StatusUpdate({\n  tone = \"success\",\n  title,\n  description,\n  action,\n  className,\n  ...props\n}: StatusUpdateProps) {\n  const t = tones[tone]\n  const Icon = t.icon\n  return (\n    <div\n      role=\"status\"\n      data-slot=\"status-update\"\n      className={cn(\n        \"flex w-full items-center gap-3 rounded-host-xl border-[length:var(--border-width-regular,0.5px)] border-host-border-secondary bg-host-bg p-4 text-host-fg font-[family-name:var(--font-sans)]\",\n        className\n      )}\n      {...props}\n    >\n      <span\n        className={cn(\"flex size-9 shrink-0 items-center justify-center rounded-full\", t.chip)}\n      >\n        <Icon className=\"size-[18px]\" aria-label={t.label} />\n      </span>\n      <div className=\"flex min-w-0 flex-1 flex-col\">\n        <p className=\"text-sm font-semibold\">{title}</p>\n        {description ? (\n          <p className=\"truncate text-sm text-host-fg-tertiary\">{description}</p>\n        ) : null}\n      </div>\n      {action ? (\n        <HostButton variant=\"secondary\" onClick={action.onClick}>\n          {action.label}\n        </HostButton>\n      ) : null}\n    </div>\n  )\n}\n",
      "type": "registry:component"
    }
  ]
}