{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "angry",
  "type": "registry:ui",
  "registryDependencies": [],
  "dependencies": ["motion"],
  "devDependencies": [],
  "files": [
    {
      "path": "angry.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 AngryIconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface AngryIconProps extends HTMLAttributes<HTMLDivElement> {\n  size?: number;\n}\n\nconst EYEBROW_ROTATION = 20;\nconst DURATION = 0.6;\n\nconst PATH_VARIANTS_FACE: Variants = {\n  normal: { scale: 1, rotate: 0 },\n  animate: {\n    scale: [1, 1.2, 1.2, 1.2, 1],\n    rotate: [0, -3, 3, -1, 1, 0],\n    transition: {\n      duration: DURATION,\n      times: [0, 0.2, 0.4, 0.6, 1],\n      ease: \"easeInOut\",\n    },\n  },\n};\n\nconst PATH_VARIANTS_LEFT_EYEBROW: Variants = {\n  normal: { rotate: 0 },\n  animate: {\n    rotate: [0, EYEBROW_ROTATION, 0],\n    transition: {\n      duration: DURATION + 0.2,\n    },\n  },\n};\n\nconst PATH_VARIANTS_RIGHT_EYEBROW: Variants = {\n  normal: { rotate: 0 },\n  animate: {\n    rotate: [0, -EYEBROW_ROTATION, 0],\n    transition: {\n      duration: DURATION + 0.2,\n    },\n  },\n};\n\nconst PATH_VARIANTS_EYE: Variants = {\n  normal: { scale: 1 },\n  animate: {\n    scale: [1, 1.2, 1],\n    transition: {\n      duration: DURATION,\n    },\n  },\n};\n\nconst PATH_VARIANTS_MOUTH: Variants = {\n  normal: { translateY: 0 },\n  animate: {\n    translateY: [0, -0.5, 0],\n    transition: {\n      duration: DURATION,\n    },\n  },\n};\n\nconst AngryIcon = forwardRef<AngryIconHandle, AngryIconProps>(\n  ({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {\n    const controls = useAnimation();\n    const isControlledRef = useRef(false);\n\n    useImperativeHandle(ref, () => {\n      isControlledRef.current = true;\n\n      return {\n        startAnimation: () => controls.start(\"animate\"),\n        stopAnimation: () => controls.start(\"normal\"),\n      };\n    });\n\n    const handleMouseEnter = useCallback(\n      (e: React.MouseEvent<HTMLDivElement>) => {\n        if (isControlledRef.current) {\n          onMouseEnter?.(e);\n        } else {\n          controls.start(\"animate\");\n        }\n      },\n      [controls, onMouseEnter]\n    );\n\n    const handleMouseLeave = useCallback(\n      (e: React.MouseEvent<HTMLDivElement>) => {\n        if (isControlledRef.current) {\n          onMouseLeave?.(e);\n        } else {\n          controls.start(\"normal\");\n        }\n      },\n      [controls, onMouseLeave]\n    );\n\n    return (\n      <div\n        className={cn(className)}\n        onMouseEnter={handleMouseEnter}\n        onMouseLeave={handleMouseLeave}\n        {...props}\n      >\n        <motion.svg\n          animate={controls}\n          fill=\"none\"\n          height={size}\n          stroke=\"currentColor\"\n          strokeLinecap=\"round\"\n          strokeLinejoin=\"round\"\n          strokeWidth=\"2\"\n          variants={PATH_VARIANTS_FACE}\n          viewBox=\"0 0 24 24\"\n          width={size}\n          xmlns=\"http://www.w3.org/2000/svg\"\n        >\n          <circle cx=\"12\" cy=\"12\" r=\"10\" />\n          <motion.path\n            animate={controls}\n            d=\"M16 16s-1.5-2-4-2-4 2-4 2\"\n            variants={PATH_VARIANTS_MOUTH}\n          />\n          <motion.path\n            animate={controls}\n            d=\"M7.5 8 10 9\"\n            variants={PATH_VARIANTS_LEFT_EYEBROW}\n          />\n          <motion.path\n            animate={controls}\n            d=\"m14 9 2.5-1\"\n            variants={PATH_VARIANTS_RIGHT_EYEBROW}\n          />\n          <motion.path\n            animate={controls}\n            d=\"M9 10h.01\"\n            variants={PATH_VARIANTS_EYE}\n          />\n          <motion.path\n            animate={controls}\n            d=\"M15 10h.01\"\n            variants={PATH_VARIANTS_EYE}\n          />\n        </motion.svg>\n      </div>\n    );\n  }\n);\n\nAngryIcon.displayName = \"AngryIcon\";\n\nexport { AngryIcon };\n",
      "type": "registry:ui"
    }
  ]
}
