{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "card-media-review-decision-3",
  "type": "registry:block",
  "title": "Review decision",
  "description": "Workspace card from the overtrue/ui workspace examples. Editable source, scoped styles, and demo interactions.",
  "categories": [
    "cards",
    "workspace"
  ],
  "registryDependencies": [
    "https://ui.overtrue.xyz/r/overtrue-card-foundation.json"
  ],
  "files": [
    {
      "path": "src/blocks/registry/media-review-decision-3.tsx",
      "type": "registry:component",
      "target": "components/overtrue/blocks/media-review-decision-3.tsx",
      "content": "\"use client\";\nimport { BlockFrame } from \"./runtime/blocks/frame\";\nimport \"./runtime/cards.css\";\n// Extracted from src/components/overtrue/scenes/library.tsx:486.\nimport { useState } from \"react\";\nimport { SceneCard, Action, Person } from \"./runtime/components/overtrue/scenes/shared\";\n\nfunction CardExample({\n  id = \"creative-review\",\n}: { id?: string } = {}) {\n  const [selected] = useState(0);\n  const [drafts, setDrafts] = useState<Record<number, string>>({});\n  const [notes, setNotes] = useState<Record<number, string[]>>({});\n  const [decisions, setDecisions] = useState<Record<number, string>>({});\n  const note = drafts[selected] ?? \"\";\n  function addNote() {\n    if (!note.trim()) return;\n    setNotes((items) => ({\n      ...items,\n      [selected]: [...(items[selected] ?? []), note.trim()],\n    }));\n    setDrafts((items) => ({ ...items, [selected]: \"\" }));\n  }\n\n  return (\n    <>\n      <div className=\"overtrue-block-content\" data-workspace-page={id}>\n        <SceneCard title=\"Review decision\">\n          <Person name=\"Maya Okafor\" subtitle=\"Reviewer\" />\n          <p>Approve this version or record what needs to change.</p>\n          <div className=\"scene-actions\">\n            <Action\n              primary\n              onClick={() =>\n                setDecisions((items) => ({\n                  ...items,\n                  [selected]: \"Approved\",\n                }))\n              }\n            >\n              Approve\n            </Action>\n            <Action\n              disabled={!note.trim() && !notes[selected]?.length}\n              onClick={() => {\n                addNote();\n                setDecisions((items) => ({\n                  ...items,\n                  [selected]: \"Changes requested\",\n                }));\n              }}\n            >\n              Request changes\n            </Action>\n          </div>\n          <p role=\"status\" className=\"scene-subtle\">\n            {decisions[selected]\n              ? `${decisions[selected]} · Saved in this review.`\n              : \"Add a note before requesting changes.\"}\n          </p>\n        </SceneCard>\n      </div>\n    </>\n  );\n}\n\nexport default function Block() { return <BlockFrame><CardExample /></BlockFrame>; }\n"
    }
  ],
  "docs": "Documentation: https://ui.overtrue.xyz/blocks/media-review-decision-3. Includes the shared card foundation and hosted demo imagery. Replace sample data and navigation with your application data."
}
