{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "broadcast-composer",
  "title": "Broadcast composer",
  "description": "Choose a channel, edit a short bulletin, and post it to the station’s local board.",
  "dependencies": [
    "lucide-react@1.73.0"
  ],
  "registryDependencies": [
    "https://www.cyberspec.dev/r/recipe-layout.json",
    "https://www.cyberspec.dev/r/badge.json",
    "https://www.cyberspec.dev/r/button.json",
    "https://www.cyberspec.dev/r/select.json",
    "https://www.cyberspec.dev/r/textarea.json"
  ],
  "files": [
    {
      "path": "registry/cyber/recipes/broadcast-composer.tsx",
      "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport { Send } from \"lucide-react\"\nimport { Badge } from \"@/registry/cyber/ui/badge\"\nimport { Button } from \"@/registry/cyber/ui/button\"\nimport { Select } from \"@/registry/cyber/ui/select\"\nimport { Textarea } from \"@/registry/cyber/ui/textarea\"\nimport \"./recipe-layout.css\"\n\nconst channels = [\"Ferry desk\", \"Night studio\", \"All districts\"]\n\nexport default function BroadcastComposer() {\n  const [channel, setChannel] = useState(channels[0])\n  const [draft, setDraft] = useState(\"Last ferry boards at the south pier. Have your pass ready.\")\n  const [posted, setPosted] = useState<{ channel: string; body: string } | null>(null)\n\n  return (\n    <div className=\"sink-stack\">\n      <form className=\"sink-stack\" onSubmit={event => {\n        event.preventDefault()\n        const body = draft.trim()\n        if (!body) return\n        setPosted({ channel, body })\n        setDraft(\"\")\n      }}>\n        <Select label=\"Broadcast channel\" value={channel} onValueChange={value => { if (value) setChannel(value) }}\n          options={channels.map(name => ({ label: name, value: name }))} />\n        <Textarea label=\"Bulletin\" value={draft} onValueChange={setDraft} maxLength={160} rows={2}\n          placeholder=\"Write a short bulletin\" />\n        <div className=\"sink-row\">\n          <Button tone=\"signal\" size=\"sm\" type=\"submit\" disabled={!draft.trim()}><Send aria-hidden /> Post bulletin</Button>\n        </div>\n      </form>\n      <div role=\"status\">\n        {posted && <div className=\"sink-stack\">\n          <div className=\"sink-row\"><Badge tone=\"ok\">Posted</Badge><strong>{posted.channel}</strong></div>\n          <p>{posted.body}</p>\n        </div>}\n      </div>\n    </div>\n  )\n}\n",
      "type": "registry:component",
      "target": "@components/recipes/broadcast-composer.tsx"
    }
  ],
  "categories": [
    "recipe",
    "communication"
  ],
  "type": "registry:component"
}
