{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "rocket",
  "type": "registry:ui",
  "registryDependencies": [],
  "dependencies": ["motion"],
  "devDependencies": [],
  "files": [
    {
      "path": "rocket.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 RocketIconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface RocketIconProps extends HTMLAttributes<HTMLDivElement> {\n  size?: number;\n}\n\nconst VARIANTS: Variants = {\n  normal: {\n    x: 0,\n    y: 0,\n  },\n  animate: {\n    x: [0, 0, -3, 2, -2, 1, -1, 0],\n    y: [0, -3, 0, -2, -3, -1, -2, 0],\n    transition: {\n      duration: 6,\n      ease: \"easeInOut\",\n      repeat: Number.POSITIVE_INFINITY,\n      repeatType: \"reverse\",\n      times: [0, 0.15, 0.3, 0.45, 0.6, 0.75, 0.9, 1],\n    },\n  },\n};\n\nconst FIRE_VARIANTS: Variants = {\n  normal: {\n    d: \"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z\",\n  },\n  animate: {\n    d: [\n      \"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z\",\n      \"M4.5 16.5c-1.5 1.26-3 5.5-3 5.5s4.74-1 6-2.5c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z\",\n      \"M4.5 16.5c-1.5 1.26-2.2 4.8-2.2 4.8s3.94-0.3 5.2-1.8c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z\",\n      \"M4.5 16.5c-1.5 1.26-2.8 5.2-2.8 5.2s4.54-0.7 5.8-2.2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z\",\n      \"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z\",\n    ],\n    transition: {\n      duration: 2,\n      ease: [0.4, 0, 0.2, 1],\n      repeat: Number.POSITIVE_INFINITY,\n      times: [0, 0.2, 0.5, 0.8, 1],\n    },\n  },\n};\n\nconst RocketIcon = forwardRef<RocketIconHandle, RocketIconProps>(\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          stroke=\"currentColor\"\n          strokeLinecap=\"round\"\n          strokeLinejoin=\"round\"\n          strokeWidth=\"2\"\n          variants={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=\"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z\"\n            variants={FIRE_VARIANTS}\n          />\n          <path d=\"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z\" />\n          <path d=\"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0\" />\n          <path d=\"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5\" />\n        </motion.svg>\n      </div>\n    );\n  }\n);\n\nRocketIcon.displayName = \"RocketIcon\";\n\nexport { RocketIcon };\n",
      "type": "registry:ui"
    }
  ]
}
