{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "volume",
  "type": "registry:ui",
  "registryDependencies": [],
  "dependencies": ["motion"],
  "devDependencies": [],
  "files": [
    {
      "path": "volume.tsx",
      "content": "\"use client\";\n\nimport { AnimatePresence, motion } from \"motion/react\";\nimport type { HTMLAttributes } from \"react\";\nimport {\n  Fragment,\n  forwardRef,\n  useCallback,\n  useImperativeHandle,\n  useRef,\n  useState,\n} from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\nexport interface VolumeIconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface VolumeIconProps extends HTMLAttributes<HTMLDivElement> {\n  size?: number;\n}\n\nconst VolumeIcon = forwardRef<VolumeIconHandle, VolumeIconProps>(\n  ({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {\n    const [isHovered, setIsHovered] = useState(false);\n    const isControlledRef = useRef(false);\n\n    useImperativeHandle(ref, () => {\n      isControlledRef.current = true;\n\n      return {\n        startAnimation: () => setIsHovered(true),\n        stopAnimation: () => setIsHovered(false),\n      };\n    });\n\n    const handleMouseEnter = useCallback(\n      (e: React.MouseEvent<HTMLDivElement>) => {\n        if (isControlledRef.current) {\n          onMouseEnter?.(e);\n        } else {\n          setIsHovered(true);\n        }\n      },\n      [onMouseEnter]\n    );\n\n    const handleMouseLeave = useCallback(\n      (e: React.MouseEvent<HTMLDivElement>) => {\n        if (isControlledRef.current) {\n          onMouseLeave?.(e);\n        } else {\n          setIsHovered(false);\n        }\n      },\n      [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=\"2\"\n          viewBox=\"0 0 24 24\"\n          width={size}\n          xmlns=\"http://www.w3.org/2000/svg\"\n        >\n          <path d=\"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z\" />\n          <AnimatePresence initial={false} mode=\"wait\">\n            {isHovered ? (\n              <Fragment key=\"volume-icon-active\">\n                <motion.path\n                  animate={{ opacity: 1, transition: { delay: 0.1 } }}\n                  d=\"M16 9a5 5 0 0 1 0 6\"\n                  exit={{ opacity: 0 }}\n                  initial={{ opacity: 0 }}\n                />\n                <motion.path\n                  animate={{ opacity: 1, transition: { delay: 0.2 } }}\n                  d=\"M19.364 18.364a9 9 0 0 0 0-12.728\"\n                  exit={{ opacity: 0 }}\n                  initial={{ opacity: 0 }}\n                />\n              </Fragment>\n            ) : (\n              <Fragment key=\"volume-icon-inactive\">\n                <motion.line\n                  animate={{\n                    pathLength: [0, 1],\n                    opacity: [0, 1],\n                    transition: { delay: 0.1 },\n                  }}\n                  exit={{ pathLength: 1, opacity: 1 }}\n                  initial={{ pathLength: 1, opacity: 1 }}\n                  x1=\"22\"\n                  x2=\"16\"\n                  y1=\"9\"\n                  y2=\"15\"\n                />\n                <motion.line\n                  animate={{\n                    pathLength: [0, 1],\n                    opacity: [0, 1],\n                    transition: { delay: 0.2 },\n                  }}\n                  exit={{ pathLength: 1, opacity: 1 }}\n                  initial={{ pathLength: 1, opacity: 1 }}\n                  x1=\"16\"\n                  x2=\"22\"\n                  y1=\"9\"\n                  y2=\"15\"\n                />\n              </Fragment>\n            )}\n          </AnimatePresence>\n        </svg>\n      </div>\n    );\n  }\n);\n\nVolumeIcon.displayName = \"VolumeIcon\";\n\nexport { VolumeIcon };\n",
      "type": "registry:ui"
    }
  ]
}
