{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "face-smile",
  "title": "face-smile",
  "description": "Animated face-smile icon for React",
  "type": "registry:ui",
  "registryDependencies": [],
  "dependencies": ["motion"],
  "files": [
    {
      "path": "face-smile.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 FaceSmileIconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface FaceSmileIconProps 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.1],\n    rotate: [0, -3, 3, 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.182 15.182C13.4246 16.9393 10.5754 16.9393 8.81802 15.182\",\n    pathLength: 1,\n    pathOffset: 0,\n    transition: { duration: 0.3, ease: \"easeOut\" },\n  },\n  animate: {\n    d: [\n      \"M15.182 15.182C13.4246 16.9393 10.5754 16.9393 8.81802 15.182\",\n      \"M14.5 14C13 15.5 11 15.5 9.5 14\",\n      \"M15.182 15.182C13.4246 16.9393 10.5754 16.9393 8.81802 15.182\",\n    ],\n    pathLength: [0.3, 1, 1],\n    pathOffset: [0, 0, 0],\n    transition: {\n      d: { duration: 0.4, 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 EYE_VARIANTS: Variants = {\n  normal: {\n    scale: 1,\n    opacity: 1,\n    transition: { duration: 0.3, ease: \"easeOut\" },\n  },\n  animate: {\n    scale: [1, 1.5, 0.8, 1.2],\n    opacity: [1, 1, 1, 1],\n    transition: {\n      duration: 0.5,\n      times: [0, 0.3, 0.6, 1],\n      ease: \"easeInOut\",\n    },\n  },\n};\n\nconst FaceSmileIcon = forwardRef<FaceSmileIconHandle, FaceSmileIconProps>(\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.182 15.182C13.4246 16.9393 10.5754 16.9393 8.81802 15.182\"\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={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={EYE_VARIANTS}\n          />\n        </motion.svg>\n      </div>\n    );\n  }\n);\n\nFaceSmileIcon.displayName = \"FaceSmileIcon\";\n\nexport { FaceSmileIcon };\n",
      "type": "registry:ui"
    }
  ]
}
