{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "admin-record-aside",
  "title": "Admin record aside",
  "description": "A card beside the record that lists a View's rows.",
  "files": [
    {
      "path": "registry/admin-record-aside.tsx",
      "content": "import { type RecordAsideProps } from \"@aotter/mantle-admin/app\";\nimport { useView } from \"@aotter/mantle-admin/hooks\";\n\n/**\n * Surface: browser (the record page; never an MCP Procedure action form).\n * Slots: record.aside:<schema>\n * Server authorization still applies to reads and writes; replacing this component grants nothing.\n */\n\n/** A card beside the record listing the rows of the admin View `record-history` for this record. Rename the View and its input. */\nexport function AdminRecordAside({ entry }: RecordAsideProps<object>) {\n  const history = useView(\"record-history\", { id: entry.id }, { limit: 5 });\n  return (\n    <section className=\"rounded-lg border p-4\">\n      <h3 className=\"mb-2 text-sm font-semibold\">History</h3>\n      {history.status === \"loading\" ? <p className=\"text-sm text-muted-foreground\">Loading</p> : null}\n      {history.status === \"unavailable\" || history.status === \"error\" ? <p className=\"text-sm text-muted-foreground\">Not available</p> : null}\n      {history.status === \"ready\" && history.rows.length === 0 ? <p className=\"text-sm text-muted-foreground\">Nothing yet</p> : null}\n      <ul className=\"space-y-1 text-sm\">\n        {history.rows.map((row, index) => <li key={index} className=\"truncate\">{String(Object.values(row)[0] ?? \"\")}</li>)}\n      </ul>\n    </section>\n  );\n}\n",
      "type": "registry:component",
      "target": "~/src/admin/admin-record-aside.tsx"
    }
  ],
  "meta": {
    "surface": "browser",
    "slots": [
      "record.aside:<schema>"
    ]
  },
  "type": "registry:component"
}