{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "sun-icon",
  "title": "Sun Icon",
  "description": "An animated sun icon.",
  "dependencies": [
    "motion"
  ],
  "files": [
    {
      "path": "registry/chamaac/animated-icons/sun-icon.tsx",
      "content": "\"use client\";\n\nimport { useState } from \"react\";\nimport { m, LazyMotion, domAnimation, SVGMotionProps } from \"motion/react\";\n\ninterface SunIconProps\n  extends Omit<SVGMotionProps<SVGSVGElement>, \"strokeWidth\"> {\n  size?: number;\n  duration?: number;\n  strokeWidth?: number;\n  isHovered?: boolean;\n}\n\nconst SunIcon = (props: SunIconProps) => {\n  const {\n    size = 28,\n    duration = 4,\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 rotateProps = {\n    animate: shouldAnimate ? { rotate: 360 } : { rotate: 0 },\n    transition: {\n      duration: duration,\n      ease: \"linear\" 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        onMouseEnter={() => isHovered && setIsHoveredInternal(true)}\n        onMouseLeave={() => isHovered && setIsHoveredInternal(false)}\n        {...rotateProps}\n      >\n        <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n        <circle cx=\"12\" cy=\"12\" r=\"4\" />\n        <path d=\"M12 2v2\" />\n        <path d=\"M12 20v2\" />\n        <path d=\"M4.93 4.93l1.41 1.41\" />\n        <path d=\"M17.66 17.66l1.41 1.41\" />\n        <path d=\"M2 12h2\" />\n        <path d=\"M20 12h2\" />\n        <path d=\"M6.34 17.66l-1.41 1.41\" />\n        <path d=\"M19.07 4.93l-1.41 1.41\" />\n      </m.svg>\n    </LazyMotion>\n  );\n};\n\nexport default SunIcon;\n",
      "type": "registry:component"
    }
  ],
  "type": "registry:component"
}