{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "wifi-low",
  "type": "registry:ui",
  "registryDependencies": [],
  "dependencies": ["motion"],
  "devDependencies": [],
  "files": [
    {
      "path": "wifi-low.tsx",
      "content": "\"use client\";\n\nimport { motion, useAnimation } from \"motion/react\";\nimport type { HTMLAttributes } from \"react\";\nimport {\n  forwardRef,\n  useCallback,\n  useEffect,\n  useImperativeHandle,\n  useRef,\n} from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nexport interface WifiLowIconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface WifiLowIconProps extends HTMLAttributes<HTMLDivElement> {\n  size?: number;\n}\n\nconst WIFI_LEVELS = [\n  { d: \"M12 20h.01\", initialOpacity: 1, delay: 0 },\n  { d: \"M8.5 16.429a5 5 0 0 1 7 0\", initialOpacity: 1, delay: 0.1 },\n];\n\nconst WifiLowIcon = forwardRef<WifiLowIconHandle, WifiLowIconProps>(\n  ({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {\n    const controls = useAnimation();\n    const questionControls = useAnimation();\n\n    const isControlledRef = useRef(false);\n    const hideTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n    const scheduleHide = useCallback(() => {\n      if (hideTimerRef.current) clearTimeout(hideTimerRef.current);\n      hideTimerRef.current = setTimeout(() => {\n        questionControls.start(\"hide\");\n      }, 1500);\n    }, [questionControls]);\n\n    const cancelHide = useCallback(() => {\n      if (hideTimerRef.current) {\n        clearTimeout(hideTimerRef.current);\n        hideTimerRef.current = null;\n      }\n    }, []);\n\n    useEffect(() => () => cancelHide(), [cancelHide]);\n\n    useImperativeHandle(ref, () => {\n      isControlledRef.current = true;\n\n      return {\n        startAnimation: async () => {\n          await controls.start(\"fadeOut\");\n          controls.start(\"fadeIn\");\n          questionControls.start(\"show\");\n          scheduleHide();\n        },\n        stopAnimation: () => {\n          cancelHide();\n          controls.start(\"fadeIn\");\n          questionControls.start(\"hide\");\n        },\n      };\n    });\n\n    const handleMouseEnter = useCallback(\n      async (e: React.MouseEvent<HTMLDivElement>) => {\n        if (isControlledRef.current) {\n          onMouseEnter?.(e);\n        } else {\n          cancelHide();\n          await controls.start(\"fadeOut\");\n          controls.start(\"fadeIn\");\n          questionControls.start(\"show\");\n          scheduleHide();\n        }\n      },\n      [controls, questionControls, onMouseEnter, scheduleHide, cancelHide]\n    );\n\n    const handleMouseLeave = useCallback(\n      (e: React.MouseEvent<HTMLDivElement>) => {\n        cancelHide();\n        controls.start(\"fadeIn\");\n        questionControls.start(\"hide\");\n        onMouseLeave?.(e);\n      },\n      [controls, questionControls, onMouseLeave, cancelHide]\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          {WIFI_LEVELS.map((level, index) => (\n            <motion.path\n              animate={controls}\n              d={level.d}\n              initial={{ opacity: level.initialOpacity }}\n              key={level.d}\n              variants={{\n                fadeOut: {\n                  opacity: index === 0 ? 1 : 0,\n                  transition: { duration: 0.2 },\n                },\n                fadeIn: {\n                  opacity: 1,\n                  transition: {\n                    type: \"spring\",\n                    stiffness: 300,\n                    damping: 20,\n                    delay: level.delay,\n                  },\n                },\n              }}\n            />\n          ))}\n          <motion.text\n            animate={questionControls}\n            dominantBaseline=\"central\"\n            fill=\"currentColor\"\n            fontSize=\"8\"\n            fontWeight=\"bold\"\n            initial={{ opacity: 0, scale: 0 }}\n            stroke=\"none\"\n            style={{ transformOrigin: \"12px 8px\" }}\n            textAnchor=\"middle\"\n            variants={{\n              hide: {\n                opacity: 0,\n                scale: 0,\n                transition: { duration: 0.15 },\n              },\n              show: {\n                opacity: 1,\n                scale: 1,\n                transition: {\n                  type: \"spring\",\n                  stiffness: 400,\n                  damping: 18,\n                  delay: 0.1,\n                },\n              },\n            }}\n            x=\"12\"\n            y=\"8\"\n          >\n            ?\n          </motion.text>\n        </svg>\n      </div>\n    );\n  }\n);\n\nWifiLowIcon.displayName = \"WifiLowIcon\";\n\nexport { WifiLowIcon };\n",
      "type": "registry:ui"
    }
  ]
}
