{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "battery-icon",
  "title": "Battery Icon",
  "description": "An animated battery icon.",
  "dependencies": [
    "motion"
  ],
  "files": [
    {
      "path": "registry/chamaac/animated-icons/battery-icon.tsx",
      "content": "\"use client\";\n\nimport { useState } from \"react\";\nimport { m, LazyMotion, domAnimation, SVGMotionProps } from \"motion/react\";\n\ninterface BatteryIconProps\n  extends Omit<SVGMotionProps<SVGSVGElement>, \"strokeWidth\"> {\n  size?: number;\n  duration?: number;\n  strokeWidth?: number;\n  isHovered?: boolean;\n}\n\nconst BatteryIcon = (props: BatteryIconProps) => {\n  const {\n    size = 28,\n    duration = 1,\n    strokeWidth = 2,\n    isHovered = false,\n    className,\n    ...restProps\n  } = props;\n  const [isHoveredInternal, setIsHoveredInternal] = useState(false);\n\n  const shouldAnimate = isHovered ? isHoveredInternal : true;\n\n  const getBarProps = (barIndex: number) => {\n    const appearTime = barIndex * 0.2;\n    const resetTime = 0.9;\n\n    return {\n      animate: shouldAnimate\n        ? {\n            opacity: [0, 0, 1, 1, 0],\n          }\n        : { opacity: 0 },\n      transition: {\n        duration: isHovered ? duration * 0.5 : duration,\n        ease: isHovered ? (\"easeOut\" as const) : (\"linear\" as const),\n        repeat: isHovered ? 0 : Infinity,\n        times: [\n          0,\n          appearTime,\n          appearTime + (isHovered ? 0.1 : 0.05),\n          resetTime,\n          1,\n        ],\n      },\n    };\n  };\n\n  return (\n    <LazyMotion features={domAnimation}>\n      <m.svg\n        {...restProps}\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={strokeWidth}\n        strokeLinecap=\"round\"\n        strokeLinejoin=\"round\"\n        className={className}\n        overflow=\"visible\"\n        onMouseEnter={() => isHovered && setIsHoveredInternal(true)}\n        onMouseLeave={() => isHovered && setIsHoveredInternal(false)}\n      >\n        <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n        <path d=\"M6 7h11a2 2 0 0 1 2 2v.5a.5 .5 0 0 0 .5 .5a.5 .5 0 0 1 .5 .5v3a.5 .5 0 0 1 -.5 .5a.5 .5 0 0 0 -.5 .5v.5a2 2 0 0 1 -2 2h-11a2 2 0 0 1 -2 -2v-6a2 2 0 0 1 2 -2\" />\n        <m.path d=\"M7 10l0 4\" {...getBarProps(0)} />\n        <m.path d=\"M10 10l0 4\" {...getBarProps(1)} />\n        <m.path d=\"M13 10l0 4\" {...getBarProps(2)} />\n        <m.path d=\"M16 10l0 4\" {...getBarProps(3)} />\n      </m.svg>\n    </LazyMotion>\n  );\n};\n\nexport default BatteryIcon;\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}