{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "feedback-desk",
  "title": "Workshop feedback",
  "description": "Rate a workshop, add an optional note, and record the response.",
  "registryDependencies": [
    "https://www.cyberspec.dev/r/recipe-layout.json",
    "https://www.cyberspec.dev/r/button.json",
    "https://www.cyberspec.dev/r/rating.json",
    "https://www.cyberspec.dev/r/textarea.json"
  ],
  "files": [
    {
      "path": "registry/cyber/recipes/feedback-desk.tsx",
      "content": "\"use client\"\n\nimport \"./recipe-layout.css\"\nimport { useState } from \"react\"\nimport { Button } from \"@/registry/cyber/ui/button\"\nimport { Rating } from \"@/registry/cyber/ui/rating\"\nimport { Textarea } from \"@/registry/cyber/ui/textarea\"\n\nconst levels = [\"Difficult\", \"Uneven\", \"Fair\", \"Good\", \"Excellent\"]\n\nexport default function FeedbackDesk() {\n  const [score, setScore] = useState<number | null>(null)\n  const [note, setNote] = useState(\"\")\n  const [recorded, setRecorded] = useState(false)\n\n  return (\n    <form className=\"sink-stack\" onSubmit={(event) => {\n      event.preventDefault()\n      if (score !== null) setRecorded(true)\n    }}>\n      <strong>How was the workshop?</strong>\n      <Rating label=\"Workshop rating\" value={score} levels={levels} onValueChange={(next) => {\n        setScore(next)\n        setRecorded(false)\n      }} />\n      <Textarea label=\"Notes (optional)\" placeholder=\"What should we keep or change?\" maxLength={180} rows={2} value={note} onValueChange={(next) => {\n        setNote(next)\n        setRecorded(false)\n      }} />\n      <div className=\"sink-row\">\n        <Button type=\"submit\" size=\"sm\" disabled={score === null || recorded}>Record feedback</Button>\n        <span className=\"sink-note\" role=\"status\">{recorded ? `Recorded ${score}/5${note.trim() ? \" with notes\" : \"\"}.` : \"\"}</span>\n      </div>\n    </form>\n  )\n}\n",
      "type": "registry:component",
      "target": "@components/recipes/feedback-desk.tsx"
    }
  ],
  "categories": [
    "recipe",
    "forms"
  ],
  "type": "registry:component"
}
