{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "face-frown",
  "title": "face-frown",
  "description": "Animated face-frown icon for React",
  "type": "registry:ui",
  "registryDependencies": [],
  "dependencies": ["motion"],
  "files": [
    {
      "path": "face-frown.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\";\nimport { cn } from \"@/lib/utils\";\n\nexport interface FaceFrownIconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface FaceFrownIconProps extends HTMLAttributes<HTMLDivElement> {\n  size?: number;\n}\n\nconst FACE_VARIANTS: Variants = {\n  normal: {\n    scale: 1,\n    rotate: 0,\n    transition: { duration: 0.3, ease: \"easeOut\" },\n  },\n  animate: {\n    scale: [1, 1.15, 1.05, 1.08],\n    rotate: [0, -2, 2, 0],\n    transition: {\n      duration: 0.8,\n      times: [0, 0.3, 0.6, 1],\n      ease: \"easeInOut\",\n    },\n  },\n};\n\nconst MOUTH_VARIANTS: Variants = {\n  normal: {\n    d: \"M15.1823 16.3179C14.3075 15.4432 13.1623 15.0038 12.0158 14.9999C10.859 14.996 9.70095 15.4353 8.81834 16.3179\",\n    pathLength: 1,\n    transition: { duration: 0.3, ease: \"easeOut\" },\n  },\n  animate: {\n    d: [\n      \"M15.1823 16.3179C14.3075 15.4432 13.1623 15.0038 12.0158 14.9999C10.859 14.996 9.70095 15.4353 8.81834 16.3179\",\n      \"M15.5 17C14.5 16 13 15.5 12 15.5C11 15.5 9.5 16 8.5 17\",\n      \"M15.1823 16.3179C14.3075 15.4432 13.1623 15.0038 12.0158 14.9999C10.859 14.996 9.70095 15.4353 8.81834 16.3179\",\n    ],\n    pathLength: [0.3, 1, 1],\n    transition: {\n      d: { duration: 0.5, ease: \"easeOut\" },\n      pathLength: {\n        duration: 0.5,\n        times: [0, 0.5, 1],\n        ease: \"easeInOut\",\n      },\n      delay: 0.1,\n    },\n  },\n};\n\nconst LEFT_EYE_VARIANTS: Variants = {\n  normal: {\n    scale: 1,\n    y: 0,\n    transition: { duration: 0.3, ease: \"easeOut\" },\n  },\n  animate: {\n    scale: [1, 1.3, 0.9, 1.1],\n    y: [0, -0.5, 0.3, 0],\n    transition: {\n      duration: 0.6,\n      times: [0, 0.3, 0.6, 1],\n      ease: \"easeInOut\",\n    },\n  },\n};\n\nconst RIGHT_EYE_VARIANTS: Variants = {\n  normal: {\n    scale: 1,\n    y: 0,\n    transition: { duration: 0.3, ease: \"easeOut\" },\n  },\n  animate: {\n    scale: [1, 0.9, 1.3, 1.1],\n    y: [0, -0.5, 0.3, 0],\n    transition: {\n      duration: 0.6,\n      times: [0, 0.3, 0.6, 1],\n      ease: \"easeInOut\",\n    },\n  },\n};\n\nconst FaceFrownIcon = forwardRef<FaceFrownIconHandle, FaceFrownIconProps>(\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          initial=\"normal\"\n          stroke=\"currentColor\"\n          strokeLinecap=\"round\"\n          strokeLinejoin=\"round\"\n          strokeWidth=\"1.5\"\n          variants={FACE_VARIANTS}\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=\"9\" />\n          <motion.path\n            animate={controls}\n            d=\"M15.1823 16.3179C14.3075 15.4432 13.1623 15.0038 12.0158 14.9999C10.859 14.996 9.70095 15.4353 8.81834 16.3179\"\n            initial=\"normal\"\n            variants={MOUTH_VARIANTS}\n          />\n          <motion.path\n            animate={controls}\n            d=\"M9.75 9.75C9.75 10.1642 9.58211 10.5 9.375 10.5C9.16789 10.5 9 10.1642 9 9.75C9 9.33579 9.16789 9 9.375 9C9.58211 9 9.75 9.33579 9.75 9.75Z\"\n            initial=\"normal\"\n            variants={LEFT_EYE_VARIANTS}\n          />\n          <motion.path\n            animate={controls}\n            d=\"M15 9.75C15 10.1642 14.8321 10.5 14.625 10.5C14.4179 10.5 14.25 10.1642 14.25 9.75C14.25 9.33579 14.4179 9 14.625 9C14.8321 9 15 9.33579 15 9.75Z\"\n            initial=\"normal\"\n            variants={RIGHT_EYE_VARIANTS}\n          />\n        </motion.svg>\n      </div>\n    );\n  }\n);\n\nFaceFrownIcon.displayName = \"FaceFrownIcon\";\n\nexport { FaceFrownIcon };\n",
      "type": "registry:ui"
    }
  ]
}
