{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "discord",
  "type": "registry:ui",
  "registryDependencies": [],
  "dependencies": ["motion"],
  "devDependencies": [],
  "files": [
    {
      "path": "discord.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 DiscordIconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface DiscordIconProps extends HTMLAttributes<HTMLDivElement> {\n  size?: number;\n}\n\nconst VARIANTS: Variants = {\n  normal: {\n    translateX: 0,\n    opacity: 1,\n    transition: {\n      duration: 0.2,\n    },\n  },\n  animate: {\n    translateX: [0, -2, 2, -2, 2, 0],\n    opacity: 1,\n    transition: {\n      duration: 0.4,\n      times: [0, 0.2, 0.4, 0.6, 0.8, 1],\n      ease: \"easeInOut\",\n    },\n  },\n};\n\nconst DiscordIcon = forwardRef<DiscordIconHandle, DiscordIconProps>(\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=\"3\"\n          style={{ overflow: \"visible\" }}\n          viewBox=\"0 0 44 44\"\n          width={size}\n          xmlns=\"http://www.w3.org/2000/svg\"\n        >\n          <motion.path\n            animate={controls}\n            d=\"M17.54,34.22A47.42,47.42,0,0,1,14.68,38C7.3,37.79,4.5,33,4.5,33A44.83,44.83,0,0,1,9.31,13.48,16.47,16.47,0,0,1,18.69,10l1,2.31\"\n            initial=\"normal\"\n            variants={VARIANTS}\n          />\n          <motion.path\n            animate={controls}\n            d=\"M17.85,22.67a3.48,3.48,0,0,0-3.37,3.9,3.38,3.38,0,0,0,3.31,3.22,3.53,3.53,0,0,0,3.43-3.9A3.45,3.45,0,0,0,17.85,22.67Z\"\n            initial=\"normal\"\n            variants={VARIANTS}\n          />\n          <motion.path\n            animate={controls}\n            d=\"M12.2,14.37a28.19,28.19,0,0,1,8.16-2.18A23.26,23.26,0,0,1,24,12a23.26,23.26,0,0,1,3.64.21,28.19,28.19,0,0,1,8.16,2.18m-7.47-2.09l1-2.31a16.47,16.47,0,0,1,9.38,3.51A44.83,44.83,0,0,1,43.5,33S40.7,37.79,33.32,38a47.42,47.42,0,0,1-2.86-3.81\"\n            initial=\"normal\"\n            variants={VARIANTS}\n          />\n          <motion.path\n            animate={controls}\n            d=\"M36.92,31.29a29.63,29.63,0,0,1-8.64,3.49,21.25,21.25,0,0,1-4.28.4h0a21.25,21.25,0,0,1-4.28-.4,29.63,29.63,0,0,1-8.64-3.49\"\n            initial=\"normal\"\n            variants={VARIANTS}\n          />\n          <motion.path\n            animate={controls}\n            d=\"M30.15,22.67a3.48,3.48,0,0,1,3.37,3.9,3.38,3.38,0,0,1-3.31,3.22,3.53,3.53,0,0,1-3.43-3.9A3.45,3.45,0,0,1,30.15,22.67Z\"\n            initial=\"normal\"\n            variants={VARIANTS}\n          />\n        </svg>\n      </div>\n    );\n  }\n);\n\nDiscordIcon.displayName = \"DiscordIcon\";\n\nexport { DiscordIcon };\n",
      "type": "registry:ui"
    }
  ]
}
