{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "player-stats",
  "title": "Player stats",
  "description": "HUD stats (VPIP, PFR, 3-bet, c-bet, WTSD…) as tiles with the counts behind each percentage.",
  "registryDependencies": [
    "https://www.pokerstudy.ai/r/poker-core.json"
  ],
  "files": [
    {
      "path": "src/components/pokerstudy/player-stats.tsx",
      "content": "import { STAT_LABELS, type PlayerStats, type StatKey } from \"@/lib/pokerstudy/poker\";\n\nconst DEFAULT_KEYS: StatKey[] = [\"vpip\", \"pfr\", \"threeBet\", \"foldToThreeBet\", \"cbetFlop\", \"foldToCbetFlop\", \"wtsd\", \"wonAtShowdown\"];\n\n/**\n * HUD stats as a grid of tiles: the percentage, and the count it came from so\n * a 100% on two hands reads as two hands. Stats with no opportunities show a\n * dash.\n */\nexport function PlayerStatsGrid({\n  stats,\n  keys = DEFAULT_KEYS,\n  className = \"\",\n}: {\n  stats: PlayerStats;\n  keys?: StatKey[];\n  className?: string;\n}) {\n  return (\n    <dl className={`grid grid-cols-2 gap-px overflow-hidden rounded-md bg-white/10 sm:grid-cols-4 ${className}`}>\n      {keys.map((k) => {\n        const v = stats[k];\n        return (\n          <div key={k} className=\"flex flex-col gap-0.5 bg-neutral-950 px-3 py-2.5\">\n            <dt className=\"text-[11px] text-muted-foreground\">{STAT_LABELS[k]}</dt>\n            <dd className=\"flex items-baseline gap-1.5\">\n              <span className=\"font-mono text-lg font-semibold tabular-nums text-foreground\">\n                {v && v.denom > 0 ? `${Math.round(v.pct * 100)}%` : \"–\"}\n              </span>\n              {v && v.denom > 0 ? (\n                <span className=\"font-mono text-[11px] tabular-nums text-muted-foreground\">\n                  {v.num}/{v.denom}\n                </span>\n              ) : null}\n            </dd>\n          </div>\n        );\n      })}\n    </dl>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/pokerstudy/player-stats.tsx"
    }
  ],
  "type": "registry:component"
}