{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "trainer-theme",
  "title": "Trainer theme",
  "description": "Action and grade colors for the trainer, shared with the solver grid, plus suit helpers for card faces.",
  "registryDependencies": [
    "https://www.pokerstudy.ai/r/poker-core.json",
    "https://www.pokerstudy.ai/r/trainer-types.json"
  ],
  "files": [
    {
      "path": "src/components/trainer/theme.ts",
      "content": "/**\n * Trainer palette — the web app's colors, not the mobile app's.\n *\n * The action colors are literally the ones the solver's strategy grid uses\n * ([solver/strategy-grid.tsx]) so an action reads the same whether you meet it\n * in a solve, an Explorer range, or a drill. Everything else (table felt, seats,\n * chrome) comes from the zinc/token palette in globals.css, so the trainer sits\n * inside the app instead of importing the mobile app's navy + teal.\n */\n\nimport type { ActionKind } from \"@/lib/trainer/types\";\nimport { ACTION_COLORS, GRADE_COLORS, type Grade } from \"@/lib/pokerstudy/poker\";\n\nexport { ACTION_COLORS } from \"@/lib/pokerstudy/poker\";\n\n/**\n * Color for a preflop/postflop action. `kind` decides the family; the label\n * splits raises into bets (\"Bet 5.8\") and re-raises (\"Raise\"/\"3B\"/\"60%\"), which\n * the solver grid already distinguishes.\n */\nexport function actionColor(kind: ActionKind | \"check\", label?: string): string {\n  switch (kind) {\n    case \"fold\":\n      return ACTION_COLORS.Fold;\n    case \"check\":\n      return ACTION_COLORS.Check;\n    case \"call\":\n      return ACTION_COLORS.Call;\n    case \"allin\":\n      return ACTION_COLORS.AllIn;\n    case \"raise\":\n      return label?.toLowerCase().startsWith(\"bet\") ? ACTION_COLORS.Bet : ACTION_COLORS.Raise;\n    default:\n      return \"var(--secondary)\";\n  }\n}\n\n/**\n * Grade ramp. Deliberately a five-step semantic scale (the one thing that can't\n * be monochrome — the whole point is reading severity at a glance), anchored at\n * both ends by the action palette above: perfect is the Call green, a blunder is\n * the Raise crimson.\n */\nexport const TIER_COLORS: Record<Grade, string> = GRADE_COLORS;\n\n/** Broadcast-style card tiles (suit-colored faces); shared with the registry. */\nexport { suitTile } from \"@/lib/pokerstudy/poker\";\n\n/** Suit colors, matching the hand replayer's four-color deck. */\nexport function suitMeta(s: string): { sym: string; color: string } {\n  switch (s.toLowerCase()) {\n    case \"h\":\n      return { sym: \"♥\", color: \"text-red-600\" };\n    case \"d\":\n      return { sym: \"♦\", color: \"text-blue-600\" };\n    case \"c\":\n      return { sym: \"♣\", color: \"text-emerald-700\" };\n    case \"s\":\n      return { sym: \"♠\", color: \"text-zinc-900\" };\n    default:\n      return { sym: s, color: \"text-zinc-900\" };\n  }\n}\n",
      "type": "registry:lib",
      "target": "components/trainer/theme.ts"
    }
  ],
  "type": "registry:lib"
}