{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "lock-open",
  "title": "lock-open",
  "description": "Animated lock-open icon for React",
  "type": "registry:ui",
  "registryDependencies": [],
  "dependencies": ["motion"],
  "files": [
    {
      "path": "lock-open.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 LockOpenIconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface LockOpenIconProps extends HTMLAttributes<HTMLDivElement> {\n  size?: number;\n}\n\nconst SVG_VARIANTS: Variants = {\n  normal: {\n    scale: 1,\n  },\n  animate: {\n    scale: [1, 1.05, 1],\n    transition: {\n      duration: 0.4,\n      ease: \"easeInOut\",\n    },\n  },\n};\n\nconst SHACKLE_VARIANTS: Variants = {\n  normal: {\n    y: 0,\n  },\n  animate: {\n    y: [0, -1.25, 0],\n    transition: {\n      duration: 0.4,\n      ease: \"easeOut\",\n    },\n  },\n};\n\nconst LockOpenIcon = forwardRef<LockOpenIconHandle, LockOpenIconProps>(\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        <motion.svg\n          animate={controls}\n          fill=\"none\"\n          height={size}\n          initial=\"normal\"\n          stroke=\"currentColor\"\n          strokeLinecap=\"round\"\n          strokeLinejoin=\"round\"\n          strokeWidth=\"1.5\"\n          variants={SVG_VARIANTS}\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=\"M13.5 10.5V6.75C13.5 4.26472 15.5147 2.25 18 2.25C20.4853 2.25 22.5 4.26472 22.5 6.75V10.5\"\n            initial=\"normal\"\n            variants={SHACKLE_VARIANTS}\n          />\n          <path d=\"M3.75 21.75H14.25C15.4926 21.75 16.5 20.7426 16.5 19.5V12.75C16.5 11.5074 15.4926 10.5 14.25 10.5H3.75C2.50736 10.5 1.5 11.5074 1.5 12.75V19.5C1.5 20.7426 2.50736 21.75 3.75 21.75Z\" />\n        </motion.svg>\n      </div>\n    );\n  }\n);\n\nLockOpenIcon.displayName = \"LockOpenIcon\";\n\nexport { LockOpenIcon };\n",
      "type": "registry:ui"
    }
  ]
}
