{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "wrench",
  "type": "registry:ui",
  "registryDependencies": [],
  "dependencies": ["motion"],
  "devDependencies": [],
  "files": [
    {
      "path": "wrench.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\";\n\nimport { cn } from \"@/lib/utils\";\n\nexport interface WrenchIconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface WrenchIconProps extends HTMLAttributes<HTMLDivElement> {\n  size?: number;\n}\n\nconst ICON_VARIANTS: Variants = {\n  normal: {\n    rotate: 0,\n    transition: { duration: 0.25, ease: \"easeOut\" },\n  },\n  animate: {\n    rotate: [0, 12, -14, 4, 0],\n    transition: {\n      duration: 1.05,\n      times: [0, 0.42, 0.68, 0.88, 1],\n      ease: [\"easeInOut\", \"easeInOut\", \"easeOut\", \"easeOut\"],\n    },\n  },\n};\n\nconst WrenchIcon = forwardRef<WrenchIconHandle, WrenchIconProps>(\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        <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=\"2\"\n          style={{ transformOrigin: \"90% 10%\", transformBox: \"fill-box\" }}\n          variants={ICON_VARIANTS}\n          viewBox=\"0 0 24 24\"\n          width={size}\n          xmlns=\"http://www.w3.org/2000/svg\"\n        >\n          <path d=\"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z\" />\n        </motion.svg>\n      </div>\n    );\n  }\n);\n\nWrenchIcon.displayName = \"WrenchIcon\";\n\nexport { WrenchIcon };\n",
      "type": "registry:ui"
    }
  ]
}
