{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "cloud-backup",
  "type": "registry:ui",
  "registryDependencies": [],
  "dependencies": ["motion"],
  "devDependencies": [],
  "files": [
    {
      "path": "cloud-backup.tsx",
      "content": "\"use client\";\n\nimport {\n  motion,\n  type Transition,\n  useAnimation,\n  type Variants,\n} from \"motion/react\";\nimport type { HTMLAttributes } from \"react\";\nimport { forwardRef, useCallback, useImperativeHandle, useRef } from \"react\";\nimport { cn } from \"@/lib/utils\";\n\nexport interface CloudBackupIconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface CloudBackupIconProps extends HTMLAttributes<HTMLDivElement> {\n  size?: number;\n}\n\nconst BACKUP_VARIANTS: Variants = {\n  normal: { rotate: 0 },\n  animate: { rotate: -360 },\n};\n\nconst BACKUP_TRANSITION: Transition = {\n  duration: 0.8,\n  ease: \"easeInOut\",\n};\n\nconst CloudBackupIcon = forwardRef<CloudBackupIconHandle, CloudBackupIconProps>(\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        <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          <path d=\"M21 15.251A4.5 4.5 0 0 0 17.5 8h-1.79A7 7 0 1 0 3 13.607\" />\n          <motion.g\n            animate={controls}\n            initial=\"normal\"\n            transition={BACKUP_TRANSITION}\n            variants={BACKUP_VARIANTS}\n          >\n            <path d=\"M7 11v4h4\" />\n            <path d=\"M8 19a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5 4.82 4.82 0 0 0-3.41 1.41L7 15\" />\n          </motion.g>\n        </svg>\n      </div>\n    );\n  }\n);\n\nCloudBackupIcon.displayName = \"CloudBackupIcon\";\n\nexport { CloudBackupIcon };\n",
      "type": "registry:ui"
    }
  ]
}
