{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "toolbar-status",
  "type": "registry:ui",
  "title": "Toolbar Status",
  "description": "A toolbar button that reports what an action did.",
  "categories": [
    "actions"
  ],
  "dependencies": [],
  "registryDependencies": [
    "https://sprout.tulipfarm.ai/r/sprout-base.json",
    "https://sprout.tulipfarm.ai/r/button.json",
    "https://sprout.tulipfarm.ai/r/popover.json"
  ],
  "files": [
    {
      "path": "registry/sprout/components/ui/toolbar-status.tsx",
      "type": "registry:ui",
      "target": "components/ui/toolbar-status.tsx",
      "content": "'use client';\n\nimport { Children, type ReactNode } from 'react';\nimport { Button } from '@/components/ui/button';\nimport { Popover, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger } from '@/components/ui/popover';\n\nexport interface ToolbarStatusProps {\n  label: string;\n  message: string;\n  error?: boolean;\n  children?: ReactNode;\n  defaultOpen?: boolean;\n}\n\nexport function ToolbarStatus({ label, message, error = false, children, defaultOpen = false }: ToolbarStatusProps) {\n  const tone = error ? 'error' : 'success';\n  const hasActions = Children.toArray(children).length > 0;\n  return (\n    <Popover defaultOpen={defaultOpen}>\n      <span\n        data-slot=\"toolbar-status-message\"\n        role={error ? 'alert' : 'status'}\n        className=\"sprout-toolbar-status-message\"\n      >\n        {message}\n      </span>\n      <PopoverTrigger\n        data-slot=\"toolbar-status-trigger\"\n        data-status={tone}\n        className=\"sprout-toolbar-status-trigger\"\n        render={<Button variant={error ? 'destructive' : 'outline'} size=\"sm\" />}\n      >\n        <span className=\"sprout-toolbar-status-label\">{label}</span>\n      </PopoverTrigger>\n      <PopoverContent\n        data-slot=\"toolbar-status-content\"\n        data-status={tone}\n        align=\"end\"\n        className=\"sprout-toolbar-status-content\"\n      >\n        <div className=\"sprout-toolbar-status-header\">\n          <PopoverTitle className=\"sprout-toolbar-status-title\">{label}</PopoverTitle>\n          <PopoverDescription>{message}</PopoverDescription>\n        </div>\n        {hasActions && (\n          <div data-slot=\"toolbar-status-actions\" className=\"sprout-toolbar-status-actions\">\n            {children}\n          </div>\n        )}\n      </PopoverContent>\n    </Popover>\n  );\n}\n"
    }
  ],
  "css": {
    "@layer components": {
      ".sprout-toolbar-status-message": {
        "clip": "rect(0, 0, 0, 0)",
        "white-space": "nowrap",
        "border": "0",
        "width": "1px",
        "height": "1px",
        "margin": "-1px",
        "padding": "0",
        "position": "absolute",
        "overflow": "hidden"
      },
      ".sprout-toolbar-status-trigger": {
        "min-width": "0",
        "max-width": "100%"
      },
      ".sprout-toolbar-status-trigger[data-status=\"error\"]:is(:active, [data-popup-open])": {
        "background": "color-mix(in srgb, var(--sprout-danger) 18%, transparent)",
        "color": "var(--sprout-danger-hover)"
      },
      "@media (hover: hover)": {
        ".sprout-toolbar-status-trigger[data-status=\"error\"]:hover": {
          "background": "color-mix(in srgb, var(--sprout-danger) 18%, transparent)",
          "color": "var(--sprout-danger-hover)"
        }
      },
      ".sprout-toolbar-status-label": {
        "text-overflow": "ellipsis",
        "white-space": "nowrap",
        "min-width": "0",
        "overflow": "hidden"
      },
      ".sprout-toolbar-status-header": {
        "flex-direction": "column",
        "gap": "2px",
        "min-width": "0",
        "display": "flex"
      },
      ".sprout-toolbar-status-content[data-status=\"error\"] .sprout-toolbar-status-title": {
        "color": "var(--sprout-danger)"
      },
      ".sprout-toolbar-status-actions": {
        "flex-wrap": "wrap",
        "align-items": "center",
        "gap": "8px",
        "min-width": "0",
        "display": "flex"
      }
    }
  },
  "docs": "Docs and examples: https://sprout.tulipfarm.ai/components/toolbar-status/",
  "meta": {
    "source": "packages/sprout/src/components/toolbar-status.tsx"
  }
}
