{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "eye",
  "title": "eye",
  "description": "Animated eye icon for React",
  "type": "registry:ui",
  "registryDependencies": [],
  "dependencies": ["motion"],
  "files": [
    {
      "path": "eye.tsx",
      "content": "\"use client\";\n\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 EyeIconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface EyeIconProps extends HTMLAttributes<HTMLDivElement> {\n  size?: number;\n}\n\nconst EyeIcon = forwardRef<EyeIconHandle, EyeIconProps>(\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      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          <motion.path\n            animate={controls}\n            d=\"M2.03555 12.3224C1.96647 12.1151 1.9664 11.8907 2.03536 11.6834C3.42372 7.50972 7.36079 4.5 12.0008 4.5C16.6387 4.5 20.5742 7.50692 21.9643 11.6776C22.0334 11.8849 22.0335 12.1093 21.9645 12.3166C20.5761 16.4903 16.6391 19.5 11.9991 19.5C7.36119 19.5 3.42564 16.4931 2.03555 12.3224Z\"\n            style={{ originY: \"50%\" }}\n            transition={{ duration: 0.4, ease: \"easeInOut\" }}\n            variants={{\n              normal: { scaleY: 1, opacity: 1 },\n              animate: { scaleY: [1, 0.1, 1], opacity: [1, 0.3, 1] },\n            }}\n          />\n          <motion.path\n            animate={controls}\n            d=\"M15 12C15 13.6569 13.6569 15 12 15C10.3431 15 9 13.6569 9 12C9 10.3431 10.3431 9 12 9C13.6569 9 15 10.3431 15 12Z\"\n            style={{ originX: \"50%\", originY: \"50%\" }}\n            transition={{ duration: 0.4, ease: \"easeInOut\" }}\n            variants={{\n              normal: { scale: 1, opacity: 1 },\n              animate: { scale: [1, 0.3, 1], opacity: [1, 0.3, 1] },\n            }}\n          />\n        </svg>\n      </div>\n    );\n  }\n);\n\nEyeIcon.displayName = \"EyeIcon\";\n\nexport { EyeIcon };\n",
      "type": "registry:ui"
    }
  ]
}
