{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "wallet-sheet",
  "title": "Wallet Sheet",
  "description": "A slide-out sheet displaying wallet information with address, token balances, and disconnect button.",
  "registryDependencies": [
    "button",
    "sheet",
    "https://solanaui.dev/r/address-display.json",
    "https://solanaui.dev/r/token-icon.json"
  ],
  "files": [
    {
      "path": "src/registry/sol/wallet-sheet.tsx",
      "content": "\"use client\";\n\nimport {\n  ArrowUpIcon,\n  DollarSignIcon,\n  QrCodeIcon,\n  RepeatIcon,\n  WalletIcon,\n} from \"lucide-react\";\nimport type React from \"react\";\nimport { Button } from \"@/components/ui/button\";\nimport { Sheet, SheetContent, SheetTrigger } from \"@/components/ui/sheet\";\nimport { cn } from \"@/lib/utils\";\nimport { AddressDisplay } from \"@/registry/sol/address-display\";\nimport { TokenIcon } from \"@/registry/sol/token-icon\";\n\ninterface WalletSheetProps {\n  address?: string;\n  balance?: string;\n  balanceChange?: string;\n  balanceChangePercent?: string;\n  tokens?: {\n    icon: string;\n    name: string;\n    symbol: string;\n    balance: string;\n    value: string;\n    change?: string;\n  }[];\n  actions?: {\n    label: string;\n    icon?: React.ReactNode;\n  }[];\n  children?: React.ReactNode;\n  trigger?: React.ReactNode;\n  className?: string;\n}\n\nconst DEFAULT_ACTIONS = [\n  { label: \"Send\", icon: <ArrowUpIcon className=\"size-4\" /> },\n  { label: \"Swap\", icon: <RepeatIcon className=\"size-4\" /> },\n  { label: \"Receive\", icon: <QrCodeIcon className=\"size-4\" /> },\n  { label: \"Buy\", icon: <DollarSignIcon className=\"size-4\" /> },\n];\n\nconst truncateAddress = (address: string) => {\n  if (address.length <= 12) return address;\n  return `${address.slice(0, 4)}...${address.slice(-4)}`;\n};\n\nconst isNegative = (value: string) => {\n  return value.trim().startsWith(\"-\");\n};\n\nconst WalletSheet = ({\n  address,\n  balance,\n  balanceChange,\n  balanceChangePercent,\n  tokens,\n  actions = DEFAULT_ACTIONS,\n  children,\n  trigger,\n  className,\n}: WalletSheetProps) => {\n  return (\n    <Sheet>\n      <SheetTrigger asChild>\n        {trigger ?? (\n          <Button variant=\"outline\" size=\"sm\" className=\"gap-2\">\n            <WalletIcon className=\"size-4\" />\n            {address ? truncateAddress(address) : \"Connect\"}\n          </Button>\n        )}\n      </SheetTrigger>\n      <SheetContent className={cn(\"flex flex-col p-0 gap-0\", className)}>\n        {/* Header: address + copy */}\n        {address && (\n          <div className=\"flex items-center justify-center pt-6 pb-2 px-6\">\n            <AddressDisplay address={address} />\n          </div>\n        )}\n\n        {/* Balance hero */}\n        {balance && (\n          <div className=\"flex flex-col items-center gap-1 px-6 pb-4 pt-2\">\n            <span className=\"text-4xl font-semibold tracking-tight\">\n              {balance}\n            </span>\n            {(balanceChange || balanceChangePercent) && (\n              <div className=\"flex items-center gap-1.5 text-sm\">\n                {balanceChange && (\n                  <span\n                    className={cn(\n                      isNegative(balanceChange)\n                        ? \"text-red-400\"\n                        : \"text-emerald-500\",\n                    )}\n                  >\n                    {balanceChange}\n                  </span>\n                )}\n                {balanceChangePercent && (\n                  <span\n                    className={cn(\n                      isNegative(balanceChangePercent)\n                        ? \"text-red-400\"\n                        : \"text-emerald-500\",\n                    )}\n                  >\n                    {balanceChangePercent}\n                  </span>\n                )}\n              </div>\n            )}\n          </div>\n        )}\n\n        {/* Action buttons row */}\n        {actions.length > 0 && (\n          <div className=\"flex items-center justify-center gap-4 px-6 pb-5\">\n            {actions.map((action) => (\n              <div\n                key={action.label}\n                className=\"flex flex-col items-center gap-1.5\"\n              >\n                <div className=\"flex items-center justify-center size-10 rounded-full bg-muted\">\n                  {action.icon}\n                </div>\n                <span className=\"text-xs text-muted-foreground\">\n                  {action.label}\n                </span>\n              </div>\n            ))}\n          </div>\n        )}\n\n        {/* Token list */}\n        {tokens && tokens.length > 0 && (\n          <div className=\"flex flex-col flex-1 overflow-auto border-t\">\n            <span className=\"text-sm font-medium px-6 pt-4 pb-2\">Tokens</span>\n            <div className=\"flex flex-col\">\n              {tokens.map((token) => {\n                const changeNegative = token.change\n                  ? isNegative(token.change)\n                  : false;\n\n                return (\n                  <div\n                    key={token.symbol}\n                    className=\"flex items-center justify-between px-6 py-3 hover:bg-muted/50 transition-colors\"\n                  >\n                    <div className=\"flex items-center gap-3\">\n                      <TokenIcon\n                        src={token.icon}\n                        alt={token.symbol}\n                        width={36}\n                        height={36}\n                      />\n                      <div className=\"flex flex-col\">\n                        <span className=\"text-sm font-medium\">\n                          {token.name}\n                        </span>\n                        <span className=\"text-xs text-muted-foreground\">\n                          {token.balance} {token.symbol}\n                        </span>\n                      </div>\n                    </div>\n                    <div className=\"flex flex-col items-end\">\n                      <span className=\"text-sm font-medium\">{token.value}</span>\n                      {token.change && (\n                        <span\n                          className={cn(\n                            \"text-xs\",\n                            changeNegative\n                              ? \"text-red-400\"\n                              : \"text-emerald-500\",\n                          )}\n                        >\n                          {token.change}\n                        </span>\n                      )}\n                    </div>\n                  </div>\n                );\n              })}\n            </div>\n          </div>\n        )}\n\n        {/* Consumer-provided footer content (e.g. disconnect button) */}\n        {children && <div className=\"mt-auto p-4 border-t\">{children}</div>}\n      </SheetContent>\n    </Sheet>\n  );\n};\n\nexport type { WalletSheetProps };\nexport { WalletSheet };\n",
      "type": "registry:component",
      "target": "components/sol/wallet-sheet.tsx"
    }
  ],
  "type": "registry:component"
}