{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "chat-bubble-bottom-center",
  "title": "chat-bubble-bottom-center",
  "description": "Animated chat-bubble-bottom-center icon for React",
  "type": "registry:ui",
  "registryDependencies": [],
  "dependencies": ["motion"],
  "files": [
    {
      "path": "chat-bubble-bottom-center.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 ChatBubbleBottomCenterIconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface ChatBubbleBottomCenterIconProps\n  extends HTMLAttributes<HTMLDivElement> {\n  size?: number;\n}\n\nconst ICON_VARIANTS: Variants = {\n  normal: {\n    scale: 1,\n    rotate: 0,\n  },\n  animate: {\n    scale: 1.05,\n    rotate: [0, -7, 7, 0],\n    transition: {\n      rotate: {\n        duration: 0.5,\n        ease: \"easeInOut\",\n      },\n      scale: {\n        type: \"spring\",\n        stiffness: 400,\n        damping: 10,\n      },\n    },\n  },\n};\n\nconst ChatBubbleBottomCenterIcon = forwardRef<\n  ChatBubbleBottomCenterIconHandle,\n  ChatBubbleBottomCenterIconProps\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      <motion.svg\n        animate={controls}\n        fill=\"none\"\n        height={size}\n        stroke=\"currentColor\"\n        strokeLinecap=\"round\"\n        strokeLinejoin=\"round\"\n        strokeWidth=\"1.5\"\n        variants={ICON_VARIANTS}\n        viewBox=\"0 0 24 24\"\n        width={size}\n        xmlns=\"http://www.w3.org/2000/svg\"\n      >\n        <path d=\"M2.25 12.76c0 1.6 1.123 2.994 2.707 3.227 1.068.157 2.148.279 3.238.364.466.037.893.281 1.153.671L12 21l2.652-3.978c.26-.39.687-.634 1.153-.67 1.09-.086 2.17-.208 3.238-.365 1.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      </motion.svg>\n    </div>\n  );\n});\n\nChatBubbleBottomCenterIcon.displayName = \"ChatBubbleBottomCenterIcon\";\n\nexport { ChatBubbleBottomCenterIcon };\n",
      "type": "registry:ui"
    }
  ]
}
