{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "sunset",
  "type": "registry:ui",
  "registryDependencies": [],
  "dependencies": ["motion"],
  "devDependencies": [],
  "files": [
    {
      "path": "sunset.tsx",
      "content": "\"use client\";\n\nimport type { Variants } from \"motion/react\";\nimport { motion, useAnimation } from \"motion/react\";\nimport type { HTMLAttributes } from \"react\";\nimport { forwardRef, useCallback, useImperativeHandle, useRef } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nexport interface SunsetIconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface SunsetIconProps extends HTMLAttributes<HTMLDivElement> {\n  size?: number;\n}\n\nconst ARROW_VARIANTS: Variants = {\n  normal: {\n    y: 0,\n  },\n  animate: {\n    y: [0, 1, 0],\n  },\n};\nconst RAYS_VARIANTS: Variants = {\n  normal: { opacity: 1 },\n  animate: (i: number) => ({\n    opacity: [0, 1],\n    transition: { delay: i * 0.1, duration: 0.3 },\n  }),\n};\n\nconst SunsetIcon = forwardRef<SunsetIconHandle, SunsetIconProps>(\n  ({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {\n    const arrowControls = useAnimation();\n    const raysControls = useAnimation();\n    const isControlledRef = useRef(false);\n\n    useImperativeHandle(ref, () => {\n      isControlledRef.current = true;\n\n      return {\n        startAnimation: () => {\n          arrowControls.start(\"animate\");\n          raysControls.start(\"animate\");\n        },\n        stopAnimation: () => {\n          arrowControls.start(\"normal\");\n          raysControls.start(\"normal\");\n        },\n      };\n    });\n\n    const handleMouseEnter = useCallback(\n      (e: React.MouseEvent<HTMLDivElement>) => {\n        if (isControlledRef.current) {\n          onMouseEnter?.(e);\n        } else {\n          arrowControls.start(\"animate\");\n          raysControls.start(\"animate\");\n        }\n      },\n      [arrowControls, raysControls, onMouseEnter]\n    );\n\n    const handleMouseLeave = useCallback(\n      (e: React.MouseEvent<HTMLDivElement>) => {\n        if (isControlledRef.current) {\n          onMouseLeave?.(e);\n        } else {\n          arrowControls.start(\"normal\");\n          raysControls.start(\"normal\");\n        }\n      },\n      [arrowControls, raysControls, onMouseLeave]\n    );\n\n    return (\n      <div\n        className={cn(className)}\n        onMouseEnter={handleMouseEnter}\n        onMouseLeave={handleMouseLeave}\n        {...props}\n      >\n        <svg\n          fill=\"none\"\n          height={size}\n          stroke=\"currentColor\"\n          strokeLinecap=\"round\"\n          strokeLinejoin=\"round\"\n          strokeWidth=\"2\"\n          viewBox=\"0 0 24 24\"\n          width={size}\n          xmlns=\"http://www.w3.org/2000/svg\"\n        >\n          <motion.g\n            animate={arrowControls}\n            initial=\"normal\"\n            variants={ARROW_VARIANTS}\n          >\n            <path d=\"M12 10V2\" />\n            <path d=\"m16 6-4 4-4-4\" />\n          </motion.g>\n\n          {[\n            \"m4.93 10.93 1.41 1.41\",\n            \"M2 18h2\",\n            \"M20 18h2\",\n            \"m19.07 10.93-1.41 1.41\",\n            \"M22 22H2\",\n            ,\n          ].map((d, index) => (\n            <motion.path\n              animate={raysControls}\n              custom={index + 1}\n              d={d}\n              initial=\"normal\"\n              key={d}\n              variants={RAYS_VARIANTS}\n            />\n          ))}\n          <path d=\"M16 18a4 4 0 0 0-8 0\" />\n        </svg>\n      </div>\n    );\n  }\n);\n\nSunsetIcon.displayName = \"SunsetIcon\";\n\nexport { SunsetIcon };\n",
      "type": "registry:ui"
    }
  ]
}
