{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "request-review-notes",
  "title": "Request review notes",
  "description": "Shows the reviewer's notes to the request's holder, or that none have been left.",
  "dependencies": [
    "@registrystack/app-runtime@~0.43.0-next.0"
  ],
  "registryDependencies": [
    "@registrystack/lib-content"
  ],
  "files": [
    {
      "path": "request/request-review-notes.tsx",
      "content": "import type { RequesterReviewNotes } from \"@registrystack/app-runtime\";\nimport { useBlockContent } from \"@/blocks/lib/content\";\n\n/**\n * What a reviewer wrote for the request's holder, when a review sent it back\n * or rejected it. The reason that came with the decision is the one reviewer\n * text BReg serves to anyone who may read the request, and it comes first.\n * Any account the notes are not disclosed to, and any state the read does not\n * resolve to notes, reads as the same not-available sentence unless a reason\n * stands in its place; only an \"available\" read shows the reviewer's notes.\n */\nexport function ReviewNotes({\n  notes,\n  noNote,\n  reason,\n}: {\n  notes: RequesterReviewNotes;\n  /** What a read with no note says; the holder's own wording when absent. */\n  noNote?: string;\n  /** The reason the reviewer wrote for the requester with the decision. */\n  reason?: string;\n}) {\n  const c = useBlockContent();\n  const decided = reason ? <p className=\"revision-note\">{reason}</p> : null;\n  if (notes.state === \"available\")\n    return (\n      <>\n        {decided}\n        {notes.notes.map((note) => (\n          <p key={note.eventId} className=\"revision-note\">\n            {note.note}\n          </p>\n        ))}\n      </>\n    );\n  if (decided) return decided;\n  if (notes.state === \"none\") return <p>{noNote ?? c.revisionNoNote}</p>;\n  return <p>{c.undisclosedRevisionReason}</p>;\n}\n",
      "type": "registry:block",
      "target": "@components/request/request-review-notes.tsx"
    }
  ],
  "type": "registry:block"
}