{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "audit-log-viewer",
  "title": "Audit Log Viewer",
  "description": "Review permission-sensitive events with timestamps, targets, outcomes, and export access.",
  "dependencies": [
    "lucide-react@^1.33.0"
  ],
  "registryDependencies": [
    "https://components.exe.xyz/r/button.json",
    "https://components.exe.xyz/r/card.json",
    "https://components.exe.xyz/r/utils.json"
  ],
  "files": [
    {
      "path": "src/components/blocks/audit-log-viewer.tsx",
      "content": "import { FileClock } from \"lucide-react\"\n\nimport { Button } from \"@/components/ui/button\"\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\"\nimport { cn } from \"@/lib/utils\"\n\nconst rows = [\n  [\"20:14:08\", \"policy.update\", \"role:editor → admin\", \"allowed\"],\n  [\"20:02:41\", \"export.create\", \"report:quarterly\", \"allowed\"],\n  [\"19:58:12\", \"secret.read\", \"vault:production\", \"denied\"],\n  [\"19:44:06\", \"session.login\", \"device:chrome\", \"allowed\"],\n]\n\nexport function AuditLogViewer() {\n  return (\n    <Card>\n      <CardHeader className=\"flex-row items-center justify-between\">\n        <CardTitle>Audit log</CardTitle>\n        <Button variant=\"ghost\" size=\"sm\">\n          <FileClock /> Export\n        </Button>\n      </CardHeader>\n      <CardContent className=\"p-0\">\n        <div className=\"overflow-x-auto\">\n          <table className=\"w-full text-left text-xs\">\n            <thead className=\"border-y text-muted-foreground\">\n              <tr>\n                {[\"Time\", \"Event\", \"Target\", \"Result\"].map((heading) => (\n                  <th key={heading} className=\"px-4 py-2 font-medium\">\n                    {heading}\n                  </th>\n                ))}\n              </tr>\n            </thead>\n            <tbody>\n              {rows.map((row) => (\n                <tr key={row.join()} className=\"border-b last:border-0\">\n                  {row.map((cell, index) => (\n                    <td\n                      key={cell}\n                      className={cn(\n                        \"px-4 py-2.5\",\n                        index < 3 && \"font-mono\",\n                        cell === \"denied\" && \"text-destructive\"\n                      )}\n                    >\n                      {cell}\n                    </td>\n                  ))}\n                </tr>\n              ))}\n            </tbody>\n          </table>\n        </div>\n      </CardContent>\n    </Card>\n  )\n}\n",
      "type": "registry:block"
    }
  ],
  "type": "registry:block"
}