{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ink/status-message",
  "title": "Status Message",
  "description": "Inline status message with icon and color",
  "dependencies": [
    "ink"
  ],
  "registryDependencies": [
    "https://termcn.dev/r/ink/spinner.json",
    "https://termcn.dev/r/ink/terminal-symbols.json",
    "https://termcn.dev/r/ink/use-theme.json",
    "https://termcn.dev/r/ink/use-unicode.json"
  ],
  "files": [
    {
      "path": "registry/ui/status-message.tsx",
      "content": "import { Box, Text } from \"ink\";\nimport type { ReactNode } from \"react\";\n\nimport { useTheme } from \"@/hooks/use-theme\";\nimport { useUnicode } from \"@/hooks/use-unicode\";\nimport { resolveStatusSymbol } from \"@/lib/terminal-symbols\";\n\nimport { Spinner } from \"./spinner\";\n\nexport type StatusVariant =\n  | \"success\"\n  | \"error\"\n  | \"warning\"\n  | \"info\"\n  | \"loading\"\n  | \"pending\";\n\nexport interface StatusMessageProps {\n  variant?: StatusVariant;\n  children: ReactNode;\n  icon?: string;\n  \"aria-label\"?: string;\n}\n\nexport const StatusMessage = ({\n  variant = \"info\",\n  children,\n  icon,\n  \"aria-label\": ariaLabel,\n}: StatusMessageProps) => {\n  const theme = useTheme();\n  const unicode = useUnicode();\n\n  const variantColor = (() => {\n    switch (variant) {\n      case \"success\": {\n        return theme.colors.success;\n      }\n      case \"error\": {\n        return theme.colors.error;\n      }\n      case \"warning\": {\n        return theme.colors.warning;\n      }\n      case \"loading\": {\n        return theme.colors.primary;\n      }\n      case \"pending\": {\n        return theme.colors.muted;\n      }\n      default: {\n        return theme.colors.info;\n      }\n    }\n  })();\n\n  return (\n    <Box gap={1} flexDirection=\"row\">\n      <Text aria-label={ariaLabel ?? `${variant} status`}>{\"\"}</Text>\n      {variant === \"loading\" ? (\n        <Spinner type=\"dots\" color={variantColor} aria-label=\"Loading\" />\n      ) : (\n        <Text aria-hidden color={variantColor}>\n          {icon ??\n            resolveStatusSymbol(\n              unicode,\n              variant as Exclude<StatusVariant, \"loading\">\n            )}\n        </Text>\n      )}\n      <Text>{children}</Text>\n    </Box>\n  );\n};\n",
      "type": "registry:ui"
    }
  ],
  "categories": [
    "feedback"
  ],
  "type": "registry:ui"
}