{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "badge-cent",
  "type": "registry:ui",
  "addGlobalCss": false,
  "registryDependencies": [],
  "dependencies": [
    "motion"
  ],
  "devDependencies": [],
  "files": [
    {
      "path": "badge-cent-icon.tsx",
      "content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport type { Variants } from \"motion/react\";\nimport {\n LazyMotion,\n domMin,\n m,\n useAnimation,\n useReducedMotion,\n} from \"motion/react\";\nimport {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useRef,\n type HTMLAttributes,\n} from \"react\";\nexport interface BadgeCentIconHandle {\n startAnimation: () => void;\n stopAnimation: () => void;\n}\n\ninterface BadgeCentIconProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n | \"color\"\n | \"onDrag\"\n | \"onDragStart\"\n | \"onDragEnd\"\n | \"onAnimationStart\"\n | \"onAnimationEnd\"\n | \"onAnimationIteration\"\n> {\n size?: number;\n duration?: number;\n isAnimated?: boolean;\n color?: string;\n}\n\nconst BadgeCentIcon = forwardRef<BadgeCentIconHandle, BadgeCentIconProps>(\n (\n  {\n   onMouseEnter,\n   onMouseLeave,\n   className,\n   size = 24,\n   duration = 1,\n   isAnimated = true,\n   color,\n   ...props\n  },\n  ref,\n ) => {\n  const outerControls = useAnimation();\n  const lineControls = useAnimation();\n  const semiControls = useAnimation();\n  const reduced = useReducedMotion();\n  const isControlled = useRef(false);\n\n  useImperativeHandle(ref, () => {\n   isControlled.current = true;\n   return {\n    startAnimation: () => {\n     if (reduced) {\n      outerControls.start(\"normal\");\n      lineControls.start(\"normal\");\n      semiControls.start(\"normal\");\n     } else {\n      outerControls.start(\"animate\");\n      lineControls.start(\"animate\");\n      semiControls.start(\"animate\");\n     }\n    },\n    stopAnimation: () => {\n     outerControls.start(\"normal\");\n     lineControls.start(\"normal\");\n     semiControls.start(\"normal\");\n    },\n   };\n  });\n\n  const handleEnter = useCallback(\n   (e?: React.MouseEvent<HTMLDivElement>) => {\n    if (!isAnimated || reduced) return;\n    if (!isControlled.current) {\n     outerControls.start(\"animate\");\n     lineControls.start(\"animate\");\n     semiControls.start(\"animate\");\n    } else onMouseEnter?.(e as any);\n   },\n   [\n    outerControls,\n    lineControls,\n    semiControls,\n    reduced,\n    onMouseEnter,\n    isAnimated,\n   ],\n  );\n\n  const handleLeave = useCallback(\n   (e?: React.MouseEvent<HTMLDivElement>) => {\n    if (!isControlled.current) {\n     outerControls.start(\"normal\");\n     lineControls.start(\"normal\");\n     semiControls.start(\"normal\");\n    } else onMouseLeave?.(e as any);\n   },\n   [outerControls, lineControls, semiControls, onMouseLeave],\n  );\n\n  const outerVariants: Variants = {\n   normal: { scale: 1, rotate: 0 },\n   animate: {\n    scale: [1, 1.02, 1],\n    rotate: [0, 180, 0],\n    transition: {\n     duration: 1.1 * duration,\n     ease: \"easeInOut\",\n    },\n   },\n  };\n\n  const lineVariants: Variants = {\n   normal: { strokeDashoffset: 0, scaleY: 1, opacity: 1 },\n   animate: {\n    strokeDashoffset: [16, 0],\n    scaleY: [1, 1.16, 0.98, 1],\n    opacity: [0.9, 1, 1],\n    transition: {\n     duration: 0.8 * duration,\n     ease: \"easeInOut\",\n     delay: 0.18,\n    },\n   },\n  };\n\n  const semiVariants: Variants = {\n   normal: { strokeDashoffset: 0, opacity: 1 },\n   animate: {\n    strokeDashoffset: [80, 0],\n    opacity: [0, 1],\n    transition: {\n     duration: 0.9 * duration,\n     ease: [0.22, 0.8, 0.2, 1],\n     delay: 0.32,\n    },\n   },\n  };\n\n  return (\n   <LazyMotion features={domMin} strict>\n    <m.div\n     className={cn(\"inline-flex items-center justify-center\", className)}\n     onMouseEnter={handleEnter}\n     onMouseLeave={handleLeave}\n     {...props}\n     style={{ color, ...props.style }}\n    >\n     <svg\n      xmlns=\"http://www.w3.org/2000/svg\"\n      width={size}\n      height={size}\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth=\"2\"\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n     >\n      <m.path\n       d=\"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z\"\n       initial=\"normal\"\n       animate={outerControls}\n       variants={outerVariants}\n       style={{ strokeDasharray: 260, transformOrigin: \"12px 12px\" }}\n      />\n      <m.path\n       d=\"M12 7v10\"\n       initial=\"normal\"\n       animate={lineControls}\n       variants={lineVariants}\n       style={{\n        strokeDasharray: 16,\n        strokeLinecap: \"round\",\n        transformOrigin: \"12px 12px\",\n       }}\n      />\n      <m.path\n       d=\"M15.4 10a4 4 0 1 0 0 4\"\n       initial=\"normal\"\n       animate={semiControls}\n       variants={semiVariants}\n       style={{ strokeDasharray: 80, strokeLinecap: \"round\" }}\n      />\n     </svg>\n    </m.div>\n   </LazyMotion>\n  );\n },\n);\n\nBadgeCentIcon.displayName = \"BadgeCentIcon\";\nexport { BadgeCentIcon };\n",
      "type": "registry:ui"
    }
  ]
}