{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "casework-review-context",
  "title": "Review context",
  "description": "What a reviewer reads before deciding: the task's subject and the context Casework recorded for it.",
  "dependencies": [
    "@registrystack/app-runtime@~0.43.0-next.0"
  ],
  "registryDependencies": [
    "@registrystack/casework-content",
    "@registrystack/casework-shared",
    "@registrystack/casework-subject",
    "@registrystack/lib-format",
    "@registrystack/lib-content"
  ],
  "files": [
    {
      "path": "casework/review-context.tsx",
      "content": "import type { RegistryModel, ReviewTaskDetail } from \"@registrystack/app-runtime\";\nimport { useLocale } from \"@/blocks/lib/content\";\nimport { fill } from \"@/blocks/lib/format\";\nimport { useCaseworkContent } from \"@/blocks/casework/casework-content\";\nimport { Notice } from \"@/blocks/casework/shared\";\nimport { Subject } from \"@/blocks/casework/subject\";\n\n/**\n * What a reviewer reads before deciding: the task's subject, under the\n * heading that names it, the warning a rebound source projection earns, and\n * the policy line naming the review policy the task was raised under. A page\n * that already read the registry model passes it on to the subject.\n */\nexport function ReviewContext({\n  task,\n  model,\n  policyLine = true,\n}: {\n  task: ReviewTaskDetail;\n  model?: RegistryModel;\n  /** Whether to name the policy id and version; a page for reviewers leaves it out. */\n  policyLine?: boolean;\n}) {\n  const c = useCaseworkContent();\n  const locale = useLocale();\n  const context = task.context;\n  return (\n    <section className=\"review-context\">\n      <h2>{c.contextHeading}</h2>\n      {context.strategy === \"source\" &&\n        context.bindingStatus === \"binding_changed\" && (\n          <Notice tone=\"warning\">{c.contextSourceChanged}</Notice>\n        )}\n      <Subject task={task} model={model} />\n      {policyLine && (\n        <p className=\"muted\">\n          {fill(\n            c.policyLine,\n            {\n              id: task.policy.id,\n              version: task.policy.version,\n            },\n            locale,\n          )}\n        </p>\n      )}\n    </section>\n  );\n}\n",
      "type": "registry:block",
      "target": "@components/casework/review-context.tsx"
    }
  ],
  "type": "registry:block"
}