{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "tree-deciduous",
  "type": "registry:ui",
  "registryDependencies": [],
  "dependencies": ["motion"],
  "devDependencies": [],
  "files": [
    {
      "path": "tree-deciduous.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 TreeDeciduousIconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface TreeDeciduousIconProps extends HTMLAttributes<HTMLDivElement> {\n  size?: number;\n}\n\nconst TREE_DECIDUOUS_VARIANTS: Variants = {\n  normal: { rotate: 0 },\n  animate: {\n    rotate: [0, -10, 10, -10, 0],\n    transition: {\n      duration: 0.5,\n      ease: \"easeInOut\",\n    },\n  },\n};\n\nconst TreeDeciduousIcon = forwardRef<\n  TreeDeciduousIconHandle,\n  TreeDeciduousIconProps\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: \"12px 21px\" }}\n        variants={TREE_DECIDUOUS_VARIANTS}\n        viewBox=\"0 0 24 24\"\n        width={size}\n        xmlns=\"http://www.w3.org/2000/svg\"\n      >\n        <motion.path d=\"M8 19a4 4 0 0 1-2.24-7.32A3.5 3.5 0 0 1 9 6.03V6a3 3 0 1 1 6 0v.04a3.5 3.5 0 0 1 3.24 5.65A4 4 0 0 1 16 19Z\" />\n        <path d=\"M12 19v3\" />\n      </motion.svg>\n    </div>\n  );\n});\n\nTreeDeciduousIcon.displayName = \"TreeDeciduousIcon\";\n\nexport { TreeDeciduousIcon };\n",
      "type": "registry:ui"
    }
  ]
}
