{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "channel-inbox",
  "title": "Channel inbox",
  "description": "Catch up on timestamped messages across three desk channels and acknowledge each thread.",
  "dependencies": [
    "lucide-react@1.73.0"
  ],
  "registryDependencies": [
    "https://www.cyberspec.dev/r/recipe-layout.json",
    "https://www.cyberspec.dev/r/button.json",
    "https://www.cyberspec.dev/r/feed.json",
    "https://www.cyberspec.dev/r/tabs.json"
  ],
  "files": [
    {
      "path": "registry/cyber/recipes/channel-inbox.tsx",
      "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport { Check } from \"lucide-react\"\nimport { Button } from \"@/registry/cyber/ui/button\"\nimport { Feed } from \"@/registry/cyber/ui/feed\"\nimport { Tabs } from \"@/registry/cyber/ui/tabs\"\nimport \"./recipe-layout.css\"\n\nconst channels = [\n  { name: \"Studio\", messages: [\n    { id: \"reel\", time: \"21:10\", actor: \"Mara Voss\", text: \"The Glasswater reel is cut. Listen for the bells at the end.\" },\n    { id: \"cue\", time: \"21:12\", actor: \"Ilya Brandt\", text: \"Heard them. The reel can go in the late slot.\" },\n  ] },\n  { name: \"Field\", messages: [\n    { id: \"dock\", time: \"20:56\", actor: \"Dex Marlowe\", text: \"At the south pier. The walkway opens with the first ferry.\" },\n    { id: \"crew\", time: \"21:03\", actor: \"Sable Quinn\", text: \"Crew is here. We'll board together.\" },\n  ] },\n  { name: \"Dispatch\", messages: [\n    { id: \"parcel\", time: \"20:48\", actor: \"Juno Okafor\", text: \"A replacement recorder is waiting at the Lowtide desk.\" },\n  ] },\n]\n\nexport default function ChannelInbox() {\n  const [acknowledged, setAcknowledged] = useState<string[]>([])\n  return (\n    <Tabs label=\"Desk channels\" defaultValue={channels[0].name} tabs={channels.map(channel => {\n      const received = acknowledged.includes(channel.name)\n      return {\n        value: channel.name, label: channel.name,\n        content: <div className=\"sink-stack\">\n          <Feed label={`${channel.name} messages`} items={channel.messages} />\n          <div className=\"sink-row\">\n            <Button size=\"sm\" disabled={received} onClick={() => setAcknowledged(previous => [...previous, channel.name])}>\n              <Check aria-hidden /> {received ? \"Acknowledged\" : \"Acknowledge thread\"}\n            </Button>\n          </div>\n        </div>,\n      }\n    })} />\n  )\n}\n",
      "type": "registry:component",
      "target": "@components/recipes/channel-inbox.tsx"
    }
  ],
  "categories": [
    "recipe",
    "communication"
  ],
  "type": "registry:component"
}
