{
  "name": "cooldown-bar",
  "type": "registry:ui",
  "framework": "react",
  "title": "Cooldown Bar",
  "description": "A slim progress bar with a label and monospace countdown for command cooldowns.",
  "files": [
    {
      "path": "ui/cooldown-bar.tsx",
      "content": "import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst CooldownBar = React.forwardRef<\n  HTMLDivElement,\n  React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n  <div\n    ref={ref}\n    className={cn(\"flex max-w-[260px] flex-col gap-1.5\", className)}\n    {...props}\n  />\n))\nCooldownBar.displayName = \"CooldownBar\"\n\nconst CooldownBarLabel = React.forwardRef<\n  HTMLDivElement,\n  React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n  <div\n    ref={ref}\n    className={cn(\n      \"flex justify-between text-xs text-newt-text-muted\",\n      className\n    )}\n    {...props}\n  />\n))\nCooldownBarLabel.displayName = \"CooldownBarLabel\"\n\nconst CooldownBarValue = React.forwardRef<\n  HTMLElement,\n  React.HTMLAttributes<HTMLElement>\n>(({ className, ...props }, ref) => (\n  <strong\n    ref={ref}\n    className={cn(\n      \"font-[family-name:var(--newt-font-mono)] font-semibold text-newt-text-secondary\",\n      className\n    )}\n    {...props}\n  />\n))\nCooldownBarValue.displayName = \"CooldownBarValue\"\n\nexport interface CooldownBarTrackProps extends React.HTMLAttributes<HTMLDivElement> {\n  /** Fill percentage, 0-100. */\n  value: number\n  /** Switch the fill to the \"ready\" (online green) colour. */\n  ready?: boolean\n}\n\nconst CooldownBarTrack = React.forwardRef<\n  HTMLDivElement,\n  CooldownBarTrackProps\n>(({ className, value, ready = false, ...props }, ref) => {\n  const clamped = Math.min(100, Math.max(0, value))\n  return (\n    <div\n      ref={ref}\n      role=\"progressbar\"\n      aria-valuemin={0}\n      aria-valuemax={100}\n      aria-valuenow={clamped}\n      data-state={ready ? \"ready\" : \"cooling\"}\n      className={cn(\n        \"h-1.5 overflow-hidden rounded-full bg-newt-bg-base\",\n        className\n      )}\n      {...props}\n    >\n      <div\n        className={cn(\n          \"h-full rounded-full\",\n          ready ? \"bg-newt-online\" : \"bg-newt-idle\"\n        )}\n        style={{ width: `${clamped}%` }}\n      />\n    </div>\n  )\n})\nCooldownBarTrack.displayName = \"CooldownBarTrack\"\n\nexport { CooldownBar, CooldownBarLabel, CooldownBarValue, CooldownBarTrack }\n",
      "type": "registry:ui"
    }
  ]
}