{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "chat-bubble-left-ellipsis",
  "title": "chat-bubble-left-ellipsis",
  "description": "Animated chat-bubble-left-ellipsis icon for React",
  "type": "registry:ui",
  "registryDependencies": [],
  "dependencies": ["motion"],
  "files": [
    {
      "path": "chat-bubble-left-ellipsis.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\";\nimport { cn } from \"@/lib/utils\";\n\nexport interface ChatBubbleLeftEllipsisIconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface ChatBubbleLeftEllipsisIconProps\n  extends HTMLAttributes<HTMLDivElement> {\n  size?: number;\n}\n\nconst DOT_VARIANTS: Variants = {\n  normal: {\n    opacity: 1,\n  },\n  animate: (custom: number) => ({\n    opacity: [1, 0, 0, 1, 1, 0, 0, 1],\n    transition: {\n      opacity: {\n        times: [\n          0,\n          0.1,\n          0.1 + custom * 0.1,\n          0.1 + custom * 0.1 + 0.1,\n          0.5,\n          0.6,\n          0.6 + custom * 0.1,\n          0.6 + custom * 0.1 + 0.1,\n        ],\n        duration: 1.5,\n      },\n    },\n  }),\n};\n\nconst ChatBubbleLeftEllipsisIcon = forwardRef<\n  ChatBubbleLeftEllipsisIconHandle,\n  ChatBubbleLeftEllipsisIconProps\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      <svg\n        fill=\"none\"\n        height={size}\n        stroke=\"currentColor\"\n        strokeLinecap=\"round\"\n        strokeLinejoin=\"round\"\n        strokeWidth=\"1.5\"\n        viewBox=\"0 0 24 24\"\n        width={size}\n        xmlns=\"http://www.w3.org/2000/svg\"\n      >\n        {[\n          {\n            d: \"M8.625 9.75a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0\",\n            index: 0,\n          },\n          {\n            d: \"M12.75 9.75a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0\",\n            index: 1,\n          },\n          {\n            d: \"M16.875 9.75a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0\",\n            index: 2,\n          },\n        ].map((dot) => (\n          <motion.path\n            animate={controls}\n            custom={dot.index}\n            d={dot.d}\n            key={dot.index}\n            variants={DOT_VARIANTS}\n          />\n        ))}\n        <path d=\"M2.25 12.76c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.184-4.183a1.14 1.14 0 0 1 .778-.332 48.294 48.294 0 0 0 5.83-.498c1.585-.233 2.708-1.626 2.708-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z\" />\n      </svg>\n    </div>\n  );\n});\n\nChatBubbleLeftEllipsisIcon.displayName = \"ChatBubbleLeftEllipsisIcon\";\n\nexport { ChatBubbleLeftEllipsisIcon };\n",
      "type": "registry:ui"
    }
  ]
}
