{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "impersonation-banner",
  "type": "registry:ui",
  "title": "Impersonation banner",
  "description": "A top of page bar telling support staff which user account they are viewing as, with an Exit button to end the session. Common in admin and support tools.",
  "dependencies": [],
  "registryDependencies": [
    "https://ui.minidev.pro/r/button.json",
    "utils"
  ],
  "files": [
    {
      "path": "registry/ui/impersonation-banner.tsx",
      "type": "registry:ui",
      "target": "components/ui/impersonation-banner.tsx",
      "content": "\"use client\"\nimport * as React from \"react\"\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\n\nfunction ImpersonationBanner({\n  user,\n  onExit,\n  className,\n}: {\n  user: string\n  onExit?: () => void\n  className?: string\n}) {\n  return (\n    <div\n      data-slot=\"impersonation-banner\"\n      role=\"status\"\n      className={cn(\n        \"flex flex-wrap items-center justify-center gap-3 border-b border-border bg-surface px-4 py-2 text-sm text-fg shadow-highlight\",\n        className\n      )}\n    >\n      <span>You are viewing as <strong className=\"font-medium\">{user}</strong></span>\n      <Button type=\"button\" size=\"sm\" variant=\"outline\" onClick={onExit}>Exit</Button>\n    </div>\n  )\n}\nexport { ImpersonationBanner }\n"
    }
  ]
}
