{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "heart-icon",
  "title": "Heart Icon",
  "description": "An animated heart icon that beats.",
  "dependencies": [
    "motion"
  ],
  "files": [
    {
      "path": "registry/chamaac/animated-icons/heart-icon.tsx",
      "content": "\"use client\";\n\nimport { useState } from \"react\";\nimport { m, LazyMotion, domAnimation, SVGMotionProps } from \"motion/react\";\n\ninterface HeartIconProps extends SVGMotionProps<SVGSVGElement> {\n  size?: number;\n  duration?: number;\n  strokeWidth?: number;\n  isHovered?: boolean;\n}\n\nconst HeartIcon = (props: HeartIconProps) => {\n  const {\n    size = 28,\n    duration = 0.8,\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 pathAnimationProps = {\n    animate: shouldAnimate\n      ? {\n          scale: [1, 1.2, 1],\n        }\n      : { scale: 1 },\n    transition: {\n      duration: duration,\n      repeat: isHovered ? 0 : Infinity,\n      ease: \"easeInOut\" as const,\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        <m.path\n          d=\"M19.5 12.572l-7.5 7.428l-7.5 -7.428a5 5 0 1 1 7.5 -6.566a5 5 0 1 1 7.5 6.572\"\n          style={{ originX: \"12px\", originY: \"12px\" }}\n          {...pathAnimationProps}\n        />\n      </m.svg>\n    </LazyMotion>\n  );\n};\n\nexport default HeartIcon;\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}