{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "zap-off",
  "type": "registry:ui",
  "registryDependencies": [],
  "dependencies": ["motion"],
  "devDependencies": [],
  "files": [
    {
      "path": "zap-off.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 ZapOffIconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface ZapOffIconProps extends HTMLAttributes<HTMLDivElement> {\n  size?: number;\n}\n\nconst PATH_VARIANTS: Variants = {\n  normal: {\n    opacity: 1,\n    pathLength: 1,\n    transition: {\n      duration: 0.6,\n      opacity: { duration: 0.1 },\n    },\n  },\n  animate: {\n    opacity: [0, 1],\n    pathLength: [0, 1],\n    transition: {\n      duration: 0.6,\n      opacity: { duration: 0.1 },\n    },\n  },\n};\n\nconst ZapOffIcon = forwardRef<ZapOffIconHandle, ZapOffIconProps>(\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    const PATHS = [\n      \"M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317\",\n      \"M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773\",\n      \"M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643\",\n      \"m2 2 20 20\",\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=\"2\"\n          viewBox=\"0 0 24 24\"\n          width={size}\n          xmlns=\"http://www.w3.org/2000/svg\"\n        >\n          {PATHS.map((d, i) => (\n            <motion.path\n              animate={controls}\n              custom={i * 0.15}\n              d={d}\n              key={i}\n              variants={PATH_VARIANTS}\n            />\n          ))}\n        </svg>\n      </div>\n    );\n  }\n);\n\nZapOffIcon.displayName = \"ZapOffIcon\";\n\nexport { ZapOffIcon };\n",
      "type": "registry:ui"
    }
  ]
}
