{
  "name": "cai-animated-angry",
  "type": "registry:ui",
  "description": "cai-animated-angry component for the Canadian AI design system",
  "dependencies": [
    "motion"
  ],
  "files": [
    {
      "path": "components/lucide-animated/angry.tsx",
      "target": "@components/lucide-animated/cai-animated-angry.tsx",
      "content": "/*\nMIT License\n\nCopyright (c) 2024-2026 pqoqubbw\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\"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 = 20, ...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={1.5}\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"
    }
  ]
}