{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "grip-horizontal",
  "type": "registry:ui",
  "registryDependencies": [],
  "dependencies": ["motion"],
  "devDependencies": [],
  "files": [
    {
      "path": "grip-horizontal.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 GripHorizontalIconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface GripHorizontalIconProps extends HTMLAttributes<HTMLDivElement> {\n  size?: number;\n}\n\nconst CIRCLES = [\n  { cx: 5, cy: 9 },\n  { cx: 12, cy: 9 },\n  { cx: 19, cy: 9 },\n  { cx: 5, cy: 15 },\n  { cx: 12, cy: 15 },\n  { cx: 19, cy: 15 },\n];\n\nconst VARIANTS: Variants = {\n  normal: {\n    opacity: 1,\n    scale: 1,\n    transition: { duration: 0.25, ease: \"easeOut\" },\n  },\n  animate: (index: number) => {\n    const row = Math.floor(index / 3);\n    const col = index % 3;\n\n    const delay = col * 0.15 + row * 0.25;\n\n    return {\n      opacity: [1, 0.4, 1],\n      scale: [1, 0.85, 1],\n      transition: {\n        delay,\n        duration: 1,\n        ease: \"easeInOut\",\n      },\n    };\n  },\n};\n\nconst GripHorizontalIcon = forwardRef<\n  GripHorizontalIconHandle,\n  GripHorizontalIconProps\n>(({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {\n  const controls = useAnimation();\n  const isControlledRef = useRef(false);\n  const isAnimatingRef = useRef(false);\n\n  const startAnimation = useCallback(async () => {\n    if (isAnimatingRef.current) return;\n    isAnimatingRef.current = true;\n    await controls.start(\"animate\");\n    await controls.start(\"normal\");\n    isAnimatingRef.current = false;\n  }, [controls]);\n\n  const stopAnimation = useCallback(async () => {\n    if (!isAnimatingRef.current) return;\n    await controls.start(\"normal\");\n    isAnimatingRef.current = false;\n  }, [controls]);\n\n  useImperativeHandle(ref, () => {\n    isControlledRef.current = true;\n    return { startAnimation, stopAnimation };\n  });\n\n  const handleMouseEnter = useCallback(\n    (e: React.MouseEvent<HTMLDivElement>) => {\n      if (!isControlledRef.current) startAnimation();\n      onMouseEnter?.(e);\n    },\n    [startAnimation, onMouseEnter]\n  );\n\n  const handleMouseLeave = useCallback(\n    (e: React.MouseEvent<HTMLDivElement>) => {\n      if (!isControlledRef.current) stopAnimation();\n      onMouseLeave?.(e);\n    },\n    [stopAnimation, onMouseLeave]\n  );\n\n  return (\n    <div\n      className={cn(\"inline-flex items-center justify-center\", 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        {CIRCLES.map((circle, index) => (\n          <motion.circle\n            animate={controls}\n            custom={index}\n            cx={circle.cx}\n            cy={circle.cy}\n            initial=\"normal\"\n            key={`${circle.cx}-${circle.cy}`}\n            r=\"1\"\n            variants={VARIANTS}\n          />\n        ))}\n      </svg>\n    </div>\n  );\n});\n\nGripHorizontalIcon.displayName = \"GripHorizontalIcon\";\n\nexport { GripHorizontalIcon };\n",
      "type": "registry:ui"
    }
  ]
}
