{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "shift-roster",
  "title": "Shift roster",
  "description": "Browse studio crews, claim an open shift, and hand the seat back.",
  "registryDependencies": [
    "https://www.cyberspec.dev/r/recipe-layout.json",
    "https://www.cyberspec.dev/r/avatar.json",
    "https://www.cyberspec.dev/r/badge.json",
    "https://www.cyberspec.dev/r/button.json",
    "https://www.cyberspec.dev/r/tabs.json"
  ],
  "files": [
    {
      "path": "registry/cyber/recipes/shift-roster.tsx",
      "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport { Avatar } from \"@/registry/cyber/ui/avatar\"\nimport { Badge } from \"@/registry/cyber/ui/badge\"\nimport { Button } from \"@/registry/cyber/ui/button\"\nimport { Tabs } from \"@/registry/cyber/ui/tabs\"\nimport \"./recipe-layout.css\"\n\nconst shifts = [\n  { label: \"Morning\", time: \"06:00–14:00\", lead: \"Imani Bell\", role: \"Studio engineer\" },\n  { label: \"Evening\", time: \"14:00–22:00\", lead: \"Sam Chen\", role: \"Field producer\" },\n  { label: \"Night\", time: \"22:00–06:00\", lead: \"Adri Sol\", role: \"Sound engineer\" },\n]\n\nexport default function ShiftRoster() {\n  const [covering, setCovering] = useState<string | null>(null)\n  return (\n    <Tabs label=\"Studio shifts\" defaultValue=\"Morning\" tabs={shifts.map(shift => ({\n      value: shift.label, label: shift.label,\n      content: (\n        <div className=\"sink-stack\">\n          <div className=\"sink-between\">\n            <strong className=\"sink-metric\" style={{ fontSize: \"1.2rem\" }}>{shift.time}</strong>\n            <Badge tone={covering === shift.label ? \"ok\" : \"flag\"}>{covering === shift.label ? \"Covered\" : \"1 opening\"}</Badge>\n          </div>\n          <div className=\"sink-item\" style={{ justifyContent: \"flex-start\" }}>\n            <Avatar name={shift.lead} decorative shape=\"hex\" />\n            <div><strong>{shift.lead}</strong><p className=\"sink-note\">{shift.role}</p></div>\n          </div>\n          <div className=\"sink-between\">\n            <div aria-live=\"polite\"><strong>{covering === shift.label ? \"You\" : \"Open seat\"}</strong><p className=\"sink-note\">Studio assistant</p></div>\n            <Button size=\"sm\" disabled={covering !== null && covering !== shift.label}\n              onClick={() => setCovering(covering === shift.label ? null : shift.label)}>\n              {covering === shift.label ? \"Leave shift\" : \"Take shift\"}\n            </Button>\n          </div>\n          {covering && covering !== shift.label && <p className=\"sink-note\">Leave your {covering.toLowerCase()} shift to take this seat.</p>}\n        </div>\n      ),\n    }))} />\n  )\n}\n",
      "type": "registry:component",
      "target": "@components/recipes/shift-roster.tsx"
    }
  ],
  "categories": [
    "recipe",
    "planning"
  ],
  "type": "registry:component"
}
