{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "wallet",
  "title": "wallet",
  "description": "Animated wallet icon for React",
  "type": "registry:ui",
  "registryDependencies": [],
  "dependencies": ["motion"],
  "files": [
    {
      "path": "wallet.tsx",
      "content": "\"use client\";\n\nimport type { Variants } from \"motion/react\";\nimport { motion, useAnimation } from \"motion/react\";\nimport type { HTMLAttributes } from \"react\";\nimport { forwardRef, useCallback, useImperativeHandle, useRef } from \"react\";\nimport { cn } from \"@/lib/utils\";\n\nexport interface WalletIconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface WalletIconProps extends HTMLAttributes<HTMLDivElement> {\n  size?: number;\n}\n\nconst CARD_VARIANTS: Variants = {\n  normal: {\n    opacity: 1,\n    y: 0,\n  },\n  animate: (custom: number) => ({\n    opacity: [0, 1],\n    y: [2, 0],\n    transition: {\n      duration: 0.4,\n      delay: custom * 0.15,\n      ease: \"easeOut\",\n    },\n  }),\n};\n\nconst WalletIcon = forwardRef<WalletIconHandle, WalletIconProps>(\n  ({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {\n    const controls = useAnimation();\n    const isControlledRef = useRef(false);\n\n    useImperativeHandle(ref, () => {\n      isControlledRef.current = true;\n\n      return {\n        startAnimation: () => controls.start(\"animate\"),\n        stopAnimation: () => controls.start(\"normal\"),\n      };\n    });\n\n    const handleMouseEnter = useCallback(\n      (e: React.MouseEvent<HTMLDivElement>) => {\n        if (isControlledRef.current) {\n          onMouseEnter?.(e);\n        } else {\n          controls.start(\"animate\");\n        }\n      },\n      [controls, onMouseEnter]\n    );\n\n    const handleMouseLeave = useCallback(\n      (e: React.MouseEvent<HTMLDivElement>) => {\n        if (isControlledRef.current) {\n          onMouseLeave?.(e);\n        } else {\n          controls.start(\"normal\");\n        }\n      },\n      [controls, onMouseLeave]\n    );\n\n    return (\n      <div\n        className={cn(className)}\n        onMouseEnter={handleMouseEnter}\n        onMouseLeave={handleMouseLeave}\n        {...props}\n      >\n        <svg\n          fill=\"none\"\n          height={size}\n          stroke=\"currentColor\"\n          strokeLinecap=\"round\"\n          strokeLinejoin=\"round\"\n          strokeWidth=\"1.5\"\n          viewBox=\"0 0 24 24\"\n          width={size}\n          xmlns=\"http://www.w3.org/2000/svg\"\n        >\n          <path d=\"M21 12V18C21 19.2426 19.9926 20.25 18.75 20.25H5.25C4.00736 20.25 3 19.2426 3 18V12M21 12V9M3 12V9M21 12C21 10.7574 19.9926 9.75 18.75 9.75H15C15 11.4069 13.6569 12.75 12 12.75C10.3431 12.75 9 11.4069 9 9.75H5.25C4.00736 9.75 3 10.7574 3 12\" />\n          <motion.path\n            animate={controls}\n            custom={0}\n            d=\"M21 9C21 7.75736 19.9926 6.75 18.75 6.75H5.25C4.00736 6.75 3 7.75736 3 9M21 9V6M3 9V6\"\n            initial=\"normal\"\n            variants={CARD_VARIANTS}\n          />\n          <motion.path\n            animate={controls}\n            custom={1}\n            d=\"M21 9V6C21 4.75736 19.9926 3.75 18.75 3.75H5.25C4.00736 3.75 3 4.75736 3 6V9\"\n            initial=\"normal\"\n            variants={CARD_VARIANTS}\n          />\n        </svg>\n      </div>\n    );\n  }\n);\n\nWalletIcon.displayName = \"WalletIcon\";\n\nexport { WalletIcon };\n",
      "type": "registry:ui"
    }
  ]
}
