{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "grade-badge",
  "title": "Grade badge",
  "description": "A decision grade pill (Perfect to Blunder) with the EV given up in big blinds.",
  "registryDependencies": [
    "https://www.pokerstudy.ai/r/poker-core.json"
  ],
  "files": [
    {
      "path": "src/components/pokerstudy/grade-badge.tsx",
      "content": "import { GRADE_COLORS, GRADE_LABELS, type Grade } from \"@/lib/pokerstudy/poker\";\n\n/**\n * A decision grade pill: Perfect, Correct, Inaccuracy, Mistake or Blunder,\n * colored on a five-step severity ramp. Pass `evLossBb` to show what the\n * decision cost in big blinds.\n */\nexport function GradeBadge({\n  grade,\n  evLossBb,\n  className = \"\",\n}: {\n  grade: Grade;\n  evLossBb?: number | null;\n  className?: string;\n}) {\n  const loss = evLossBb != null && Number.isFinite(evLossBb) && evLossBb > 0 ? evLossBb : null;\n  return (\n    <span\n      style={{ backgroundColor: GRADE_COLORS[grade] }}\n      className={`inline-flex items-baseline gap-2 self-start rounded-full px-3 py-1 text-white ${className}`}\n    >\n      <span className=\"text-xs font-bold uppercase tracking-wide\">{GRADE_LABELS[grade]}</span>\n      {loss != null ? (\n        <span className=\"font-mono text-xs font-semibold tabular-nums opacity-90\">\n          −{loss < 10 ? loss.toFixed(2) : loss.toFixed(1)}bb\n        </span>\n      ) : null}\n    </span>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/pokerstudy/grade-badge.tsx"
    }
  ],
  "type": "registry:component"
}