{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "angry",
  "type": "registry:ui",
  "addGlobalCss": false,
  "registryDependencies": [],
  "dependencies": [
    "motion"
  ],
  "devDependencies": [],
  "files": [
    {
      "path": "angry-icon.tsx",
      "content": "\"use client\";\n\nimport { cn } from \"@/lib/utils\";\nimport type { Variants } from \"motion/react\";\nimport {\n LazyMotion,\n domMin,\n m,\n useAnimation,\n useReducedMotion,\n} from \"motion/react\";\nimport {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useRef,\n type HTMLAttributes,\n} from \"react\";\nexport interface AngryIconHandle {\n startAnimation: () => void;\n stopAnimation: () => void;\n}\n\ninterface AngryIconProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n | \"color\"\n | \"onDrag\"\n | \"onDragStart\"\n | \"onDragEnd\"\n | \"onAnimationStart\"\n | \"onAnimationEnd\"\n | \"onAnimationIteration\"\n> {\n size?: number;\n duration?: number;\n isAnimated?: boolean;\n color?: string;\n}\n\nconst AngryIcon = forwardRef<AngryIconHandle, AngryIconProps>(\n (\n  {\n   onMouseEnter,\n   onMouseLeave,\n   className,\n   size = 24,\n   duration = 1,\n   isAnimated = true,\n   color,\n   ...props\n  },\n  ref,\n ) => {\n  const controls = useAnimation();\n  const reduced = useReducedMotion();\n  const isControlled = useRef(false);\n\n  useImperativeHandle(ref, () => {\n   isControlled.current = true;\n   return {\n    startAnimation: async () => {\n     if (reduced) {\n      controls.start(\"normal\");\n      return;\n     }\n     await controls.start(\"tense\");\n     await controls.start(\"shake\");\n     await controls.start(\"flash\");\n     await controls.start(\"calm\");\n    },\n    stopAnimation: () => controls.start(\"normal\"),\n   };\n  });\n\n  const handleEnter = useCallback(\n   async (e?: React.MouseEvent<HTMLDivElement>) => {\n    if (!isAnimated || reduced) return;\n    if (!isControlled.current) {\n     await controls.start(\"tense\");\n     await controls.start(\"shake\");\n     await controls.start(\"flash\");\n     await controls.start(\"calm\");\n    } else onMouseEnter?.(e as any);\n   },\n   [controls, reduced, isAnimated, onMouseEnter],\n  );\n\n  const handleLeave = useCallback(\n   (e?: React.MouseEvent<HTMLDivElement>) => {\n    if (!isControlled.current) controls.start(\"normal\");\n    else onMouseLeave?.(e as any);\n   },\n   [controls, onMouseLeave],\n  );\n\n  const container: Variants = {\n   normal: { rotate: 0, scale: 1 },\n   tense: {\n    scale: 0.95,\n    transition: {\n     duration: 0.2 * duration,\n     ease: [0.4, 0, 0.6, 1],\n    },\n   },\n   shake: {\n    rotate: [0, -4, 4, -3, 3, -2, 2, 0],\n    scale: 1,\n    transition: {\n     duration: 0.5 * duration,\n     ease: \"linear\",\n    },\n   },\n   flash: {\n    scale: [1, 1.1, 1],\n    transition: {\n     duration: 0.3 * duration,\n     ease: [0.34, 1.56, 0.64, 1],\n    },\n   },\n   calm: {\n    rotate: 0,\n    scale: 1,\n    transition: {\n     duration: 0.4 * duration,\n     ease: [0.33, 1, 0.68, 1],\n    },\n   },\n  };\n\n  const face: Variants = {\n   normal: { scale: 1 },\n   tense: {\n    scale: 0.98,\n    transition: {\n     duration: 0.2 * duration,\n    },\n   },\n   shake: {\n    scale: 1,\n   },\n   flash: {\n    scale: [1, 1.02, 1],\n    transition: {\n     duration: 0.3 * duration,\n    },\n   },\n   calm: {\n    scale: 1,\n   },\n  };\n\n  const brow = (side: \"left\" | \"right\"): Variants => {\n   const x = side === \"left\" ? -0.5 : 0.5;\n   const rotation = side === \"left\" ? 5 : -5;\n\n   return {\n    normal: { x: 0, y: 0, rotate: 0 },\n    tense: {\n     y: -0.3,\n     rotate: rotation * 1.5,\n     transition: {\n      duration: 0.2 * duration,\n      ease: \"easeOut\",\n     },\n    },\n    shake: {\n     x: [0, x, -x, x, 0],\n     transition: {\n      duration: 0.5 * duration,\n     },\n    },\n    flash: {\n     y: -0.5,\n     rotate: rotation * 2,\n     transition: {\n      duration: 0.15 * duration,\n     },\n    },\n    calm: {\n     x: 0,\n     y: 0,\n     rotate: 0,\n     transition: {\n      duration: 0.4 * duration,\n      ease: [0.33, 1, 0.68, 1],\n     },\n    },\n   };\n  };\n\n  const eye: Variants = {\n   normal: { scaleY: 1 },\n   tense: {\n    scaleY: 0.6,\n    transition: {\n     duration: 0.2 * duration,\n     ease: \"easeOut\",\n    },\n   },\n   shake: {\n    scaleY: [0.6, 0.5, 0.6],\n   },\n   flash: {\n    scaleY: [0.6, 0.3, 0.6],\n    transition: {\n     duration: 0.3 * duration,\n    },\n   },\n   calm: {\n    scaleY: 1,\n    transition: {\n     duration: 0.4 * duration,\n     ease: [0.33, 1, 0.68, 1],\n    },\n   },\n  };\n\n  const mouth: Variants = {\n   normal: { scaleX: 1, y: 0 },\n   tense: {\n    scaleX: 0.9,\n    y: -0.5,\n    transition: {\n     duration: 0.2 * duration,\n     ease: \"easeOut\",\n    },\n   },\n   shake: {\n    y: [0, -0.3, 0],\n   },\n   flash: {\n    scaleX: 0.8,\n    y: -0.8,\n    transition: {\n     duration: 0.15 * duration,\n    },\n   },\n   calm: {\n    scaleX: 1,\n    y: 0,\n    transition: {\n     duration: 0.4 * duration,\n     ease: [0.33, 1, 0.68, 1],\n    },\n   },\n  };\n\n  return (\n   <LazyMotion features={domMin} strict>\n    <m.div\n     className={cn(\"inline-flex items-center justify-center\", className)}\n     onMouseEnter={handleEnter}\n     onMouseLeave={handleLeave}\n     {...props}\n     style={{ color, ...props.style }}\n    >\n     <m.svg\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=\"2\"\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      variants={container}\n      initial=\"normal\"\n      animate={controls}\n     >\n      <m.circle cx=\"12\" cy=\"12\" r=\"10\" variants={face} />\n\n      <m.path d=\"M7.5 8 10 9\" variants={brow(\"left\")} />\n      <m.path d=\"m14 9 2.5-1\" variants={brow(\"right\")} />\n\n      <m.path d=\"M9 10h.01\" variants={eye} />\n      <m.path d=\"M15 10h.01\" variants={eye} />\n\n      <m.path d=\"M16 16s-1.5-2-4-2-4 2-4 2\" variants={mouth} />\n     </m.svg>\n    </m.div>\n   </LazyMotion>\n  );\n },\n);\n\nAngryIcon.displayName = \"AngryIcon\";\nexport { AngryIcon };\n",
      "type": "registry:ui"
    }
  ]
}