{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "star-icon",
  "title": "Star Icon",
  "description": "An animated star icon that twinkles and rotates.",
  "dependencies": [
    "motion"
  ],
  "files": [
    {
      "path": "registry/chamaac/animated-icons/star-icon.tsx",
      "content": "\"use client\";\n\nimport { useState } from \"react\";\nimport { m, LazyMotion, domAnimation, SVGMotionProps } from \"motion/react\";\n\ninterface StarIconProps extends SVGMotionProps<SVGSVGElement> {\n  size?: number;\n  duration?: number;\n  strokeWidth?: number;\n  isHovered?: boolean;\n}\n\nconst StarIcon = (props: StarIconProps) => {\n  const {\n    size = 28,\n    duration = 2,\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          rotate: [0, 5, -5, 0],\n        }\n      : { scale: 1, rotate: 0 },\n    transition: {\n      duration: duration,\n      ease: \"easeInOut\" as const,\n      repeat: isHovered ? 0 : Infinity,\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=\"M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z\"\n          style={{ originX: \"12px\", originY: \"12px\" }}\n          {...pathAnimationProps}\n        />\n      </m.svg>\n    </LazyMotion>\n  );\n};\n\nexport default StarIcon;\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}