{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "finger-print",
  "title": "finger-print",
  "description": "Animated finger-print icon for React",
  "type": "registry:ui",
  "registryDependencies": [],
  "dependencies": ["motion"],
  "files": [
    {
      "path": "finger-print.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 FingerPrintIconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface FingerPrintIconProps extends HTMLAttributes<HTMLDivElement> {\n  size?: number;\n}\n\nconst PATH_VARIANTS: Variants = {\n  normal: { pathLength: 1, opacity: 1 },\n  animate: {\n    opacity: [0, 0, 1, 1, 1],\n    pathLength: [0.1, 0.3, 0.5, 0.7, 0.9, 1],\n    transition: {\n      opacity: { duration: 0.5 },\n      pathLength: {\n        duration: 2,\n      },\n    },\n  },\n};\n\nconst FingerPrintIcon = forwardRef<FingerPrintIconHandle, FingerPrintIconProps>(\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        <svg\n          fill=\"none\"\n          height={size}\n          stroke=\"currentColor\"\n          strokeLinecap=\"round\"\n          strokeLinejoin=\"round\"\n          strokeWidth=\"1.5\"\n          viewBox=\"0 0 24 24\"\n          width={size}\n          xmlns=\"http://www.w3.org/2000/svg\"\n        >\n          <path\n            d=\"M7.86391 4.24259C9.04956 3.45731 10.4714 3 12 3C16.1421 3 19.5 6.35786 19.5 10.5C19.5 13.4194 18.9443 16.2089 17.9324 18.7685\"\n            fill=\"none\"\n            strokeOpacity={0.4}\n          />\n          <motion.path\n            animate={controls}\n            d=\"M7.86391 4.24259C9.04956 3.45731 10.4714 3 12 3C16.1421 3 19.5 6.35786 19.5 10.5C19.5 13.4194 18.9443 16.2089 17.9324 18.7685\"\n            initial=\"normal\"\n            variants={PATH_VARIANTS}\n          />\n          <path\n            d=\"M5.7426 6.36391C4.95732 7.54956 4.5 8.97138 4.5 10.5C4.5 11.9677 4.07875 13.3369 3.3501 14.4931\"\n            fill=\"none\"\n            strokeOpacity={0.4}\n          />\n          <motion.path\n            animate={controls}\n            d=\"M5.7426 6.36391C4.95732 7.54956 4.5 8.97138 4.5 10.5C4.5 11.9677 4.07875 13.3369 3.3501 14.4931\"\n            initial=\"normal\"\n            variants={PATH_VARIANTS}\n          />\n          <path\n            d=\"M5.33889 18.052C7.14811 16.0555 8.25 13.4065 8.25 10.5C8.25 8.42893 9.92893 6.75 12 6.75C14.0711 6.75 15.75 8.42893 15.75 10.5C15.75 11.0269 15.7286 11.5487 15.686 12.0646\"\n            fill=\"none\"\n            strokeOpacity={0.4}\n          />\n          <motion.path\n            animate={controls}\n            d=\"M5.33889 18.052C7.14811 16.0555 8.25 13.4065 8.25 10.5C8.25 8.42893 9.92893 6.75 12 6.75C14.0711 6.75 15.75 8.42893 15.75 10.5C15.75 11.0269 15.7286 11.5487 15.686 12.0646\"\n            initial=\"normal\"\n            variants={PATH_VARIANTS}\n          />\n          <path\n            d=\"M12.0003 10.5C12.0003 14.2226 10.6443 17.6285 8.39916 20.2506\"\n            fill=\"none\"\n            strokeOpacity={0.4}\n          />\n          <motion.path\n            animate={controls}\n            d=\"M12.0003 10.5C12.0003 14.2226 10.6443 17.6285 8.39916 20.2506\"\n            initial=\"normal\"\n            variants={PATH_VARIANTS}\n          />\n          <path\n            d=\"M15.033 15.6543C14.4852 17.5743 13.6391 19.3685 12.5479 20.9836\"\n            fill=\"none\"\n            strokeOpacity={0.4}\n          />\n          <motion.path\n            animate={controls}\n            d=\"M15.033 15.6543C14.4852 17.5743 13.6391 19.3685 12.5479 20.9836\"\n            initial=\"normal\"\n            variants={PATH_VARIANTS}\n          />\n        </svg>\n      </div>\n    );\n  }\n);\n\nFingerPrintIcon.displayName = \"FingerPrintIcon\";\n\nexport { FingerPrintIcon };\n",
      "type": "registry:ui"
    }
  ]
}
