{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "chat-bubble-bottom-center-text",
  "title": "chat-bubble-bottom-center-text",
  "description": "Animated chat-bubble-bottom-center-text icon for React",
  "type": "registry:ui",
  "registryDependencies": [],
  "dependencies": ["motion"],
  "files": [
    {
      "path": "chat-bubble-bottom-center-text.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 ChatBubbleBottomCenterTextIconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface ChatBubbleBottomCenterTextIconProps\n  extends HTMLAttributes<HTMLDivElement> {\n  size?: number;\n}\n\nconst LINE_VARIANTS: Variants = {\n  visible: { pathLength: 1, opacity: 1 },\n  hidden: { pathLength: 0, opacity: 0 },\n};\n\nconst ChatBubbleBottomCenterTextIcon = forwardRef<\n  ChatBubbleBottomCenterTextIconHandle,\n  ChatBubbleBottomCenterTextIconProps\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: async () => {\n        await controls.start((i) => ({\n          pathLength: 0,\n          opacity: 0,\n          transition: { delay: i * 0.1, duration: 0.3 },\n        }));\n        await controls.start((i) => ({\n          pathLength: 1,\n          opacity: 1,\n          transition: { delay: i * 0.1, duration: 0.3 },\n        }));\n      },\n      stopAnimation: () => controls.start(\"visible\"),\n    };\n  });\n\n  const handleMouseEnter = useCallback(\n    async (e: React.MouseEvent<HTMLDivElement>) => {\n      if (isControlledRef.current) {\n        onMouseEnter?.(e);\n      } else {\n        await controls.start((i) => ({\n          pathLength: 0,\n          opacity: 0,\n          transition: { delay: i * 0.1, duration: 0.3 },\n        }));\n        await controls.start((i) => ({\n          pathLength: 1,\n          opacity: 1,\n          transition: { delay: i * 0.1, duration: 0.3 },\n        }));\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(\"visible\");\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          { d: \"M7.5 8.25h9\", index: 0 },\n          { d: \"M7.5 11.25H12\", index: 1 },\n        ].map((line) => (\n          <motion.path\n            animate={controls}\n            custom={line.index}\n            d={line.d}\n            initial=\"visible\"\n            key={line.index}\n            variants={LINE_VARIANTS}\n          />\n        ))}\n        <path d=\"M2.25 12.76c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 0 1 .865-.501 48.172 48.172 0 0 0 3.423-.379c1.584-.233 2.707-1.626 2.707-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\nChatBubbleBottomCenterTextIcon.displayName = \"ChatBubbleBottomCenterTextIcon\";\n\nexport { ChatBubbleBottomCenterTextIcon };\n",
      "type": "registry:ui"
    }
  ]
}
