{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "alarm-smoke",
  "type": "registry:ui",
  "registryDependencies": [],
  "dependencies": ["motion"],
  "devDependencies": [],
  "files": [
    {
      "path": "alarm-smoke.tsx",
      "content": "\"use client\";\n\nimport { motion, useAnimation, type Variants } from \"motion/react\";\nimport type { HTMLAttributes } from \"react\";\nimport { forwardRef, useCallback, useImperativeHandle, useRef } from \"react\";\nimport { cn } from \"@/lib/utils\";\n\nexport interface AlarmSmokeIconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface AlarmSmokeIconProps extends HTMLAttributes<HTMLDivElement> {\n  size?: number;\n}\n\nconst ALARM_VARIANTS: Variants = {\n  normal: { scale: 1 },\n  animate: {\n    scale: [1, 1.05, 1],\n    transition: {\n      duration: 0.5,\n      ease: \"easeInOut\",\n      delay: 0.2,\n      repeat: Number.POSITIVE_INFINITY,\n    },\n  },\n};\n\nconst SMOKE_VARIANTS: Variants = {\n  normal: {\n    y: 0,\n    opacity: 1,\n  },\n  animate: {\n    y: [6, 0],\n    opacity: [0, 1, 0],\n    transition: {\n      duration: 1.4,\n      ease: \"easeOut\",\n      repeat: Number.POSITIVE_INFINITY,\n    },\n  },\n};\n\nconst AlarmSmokeIcon = forwardRef<AlarmSmokeIconHandle, AlarmSmokeIconProps>(\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          fill=\"none\"\n          height={size}\n          stroke=\"currentColor\"\n          strokeLinecap=\"round\"\n          strokeLinejoin=\"round\"\n          strokeWidth=\"2\"\n          style={{ overflow: \"visible\" }}\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=\"M11 21c0-2.5 2-2.5 2-5\"\n            initial={{ y: 0, opacity: 1 }}\n            variants={SMOKE_VARIANTS}\n          />\n          <motion.path\n            animate={controls}\n            d=\"M16 21c0-2.5 2-2.5 2-5\"\n            initial={{ y: 0, opacity: 1 }}\n            variants={SMOKE_VARIANTS}\n          />\n          <motion.g\n            animate={controls}\n            initial={{ scale: 1, opacity: 1 }}\n            variants={ALARM_VARIANTS}\n          >\n            <motion.path d=\"m19 8-.8 3a1.25 1.25 0 0 1-1.2 1H7a1.25 1.25 0 0 1-1.2-1L5 8\" />\n            <motion.path d=\"M21 3a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V4a1 1 0 0 1 1-1z\" />\n          </motion.g>\n          <motion.path\n            animate={controls}\n            d=\"M6 21c0-2.5 2-2.5 2-5\"\n            initial={{ y: 0, opacity: 1 }}\n            variants={SMOKE_VARIANTS}\n          />\n        </motion.svg>\n      </div>\n    );\n  }\n);\n\nAlarmSmokeIcon.displayName = \"AlarmSmokeIcon\";\n\nexport { AlarmSmokeIcon };\n",
      "type": "registry:ui"
    }
  ]
}
