{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "volume-mute-01",
  "title": "volume-mute-01",
  "description": "Animated volume mute icon",
  "dependencies": [
    "motion"
  ],
  "files": [
    {
      "path": "icons/volume-mute-01.tsx",
      "content": "'use client';\n\nimport type { Variants } from 'motion/react';\nimport { motion, useAnimation } from 'motion/react';\nimport type { HTMLAttributes } from 'react';\nimport { forwardRef } from 'react';\nimport { useIconAnimation } from '@/lib/use-icon-animation';\nimport { cn } from '@/lib/utils';\n\nexport interface VolumeMute01IconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface VolumeMute01IconProps extends HTMLAttributes<HTMLDivElement> {\n  size?: number;\n}\n\nconst MUTE_MARK = 'M20 9.75L23 14.25M23 9.75L20 14.25';\nconst SOUND_WAVE =\n  'M20 9C20.6254 9.81968 21 10.8634 21 12C21 13.1366 20.6254 14.1803 20 15';\n\nconst MUTE_DURATION = 1.12;\nconst MUTE_TIMES = [\n  0, 0.05, 0.1, 0.16, 0.24, 0.34, 0.44, 0.56, 0.68, 0.76, 0.82, 0.87,\n  0.92, 0.97, 1,\n];\n\nconst departingMuteVariants: Variants = {\n  normal: {\n    transform: 'translate(0px, 0px)',\n    transition: { duration: 0.18, ease: [0.23, 1, 0.32, 1] },\n  },\n  animate: {\n    transform: [\n      'translate(0px, 0px)',\n      'translate(0.8px, 0.8px)',\n      'translate(4px, 4px)',\n      'translate(24px, 24px)',\n      'translate(24px, 24px)',\n      'translate(24px, 24px)',\n      'translate(24px, 24px)',\n      'translate(24px, 24px)',\n      'translate(24px, 24px)',\n      'translate(24px, 24px)',\n      'translate(24px, 24px)',\n      'translate(24px, 24px)',\n      'translate(24px, 24px)',\n      'translate(24px, 24px)',\n      'translate(24px, 24px)',\n    ],\n    transition: {\n      duration: MUTE_DURATION,\n      ease: 'linear',\n      times: MUTE_TIMES,\n    },\n  },\n};\n\nconst soundWaveVariants: Variants = {\n  normal: {\n    pathLength: 0,\n    transition: { duration: 0.18, ease: [0.23, 1, 0.32, 1] },\n  },\n  animate: {\n    pathLength: [0, 0, 0, 0, 0.25, 0.7, 1, 1, 1, 1, 1, 1, 0.8, 0.3, 0],\n    transition: {\n      duration: MUTE_DURATION,\n      ease: 'linear',\n      times: MUTE_TIMES,\n    },\n  },\n};\n\nconst arrivingMuteVariants: Variants = {\n  normal: {\n    transform: 'translate(-24px, -24px)',\n    transition: { duration: 0.18, ease: [0.23, 1, 0.32, 1] },\n  },\n  animate: {\n    transform: [\n      'translate(-24px, -24px)',\n      'translate(-24px, -24px)',\n      'translate(-24px, -24px)',\n      'translate(-24px, -24px)',\n      'translate(-24px, -24px)',\n      'translate(-24px, -24px)',\n      'translate(-24px, -24px)',\n      'translate(-24px, -24px)',\n      'translate(-24px, -24px)',\n      'translate(-24px, -24px)',\n      'translate(-18px, -18px)',\n      'translate(-9px, -9px)',\n      'translate(-3px, -3px)',\n      'translate(-0.6px, -0.6px)',\n      'translate(0px, 0px)',\n    ],\n    transition: {\n      duration: MUTE_DURATION,\n      ease: 'linear',\n      times: MUTE_TIMES,\n    },\n  },\n};\n\nconst generatedGeometryVariants: Variants = {\n  normal: { visibility: 'hidden', transition: { duration: 0 } },\n  animate: { visibility: 'visible', transition: { duration: 0 } },\n};\n\nconst VolumeMute01Icon = forwardRef<VolumeMute01IconHandle, VolumeMute01IconProps>(\n  ({ onMouseEnter, onMouseLeave, className, size = 28, ...props }, ref) => {\n    const controls = useAnimation();\n    const { handleMouseEnter, handleMouseLeave } = useIconAnimation({\n      controls,\n      loops: false,\n      onMouseEnter,\n      onMouseLeave,\n      ref,\n    });\n\n    return (\n      <div\n        className={cn(className)}\n        onMouseEnter={handleMouseEnter}\n        onMouseLeave={handleMouseLeave}\n        {...props}\n      >\n        <svg\n          xmlns=\"http://www.w3.org/2000/svg\"\n          width={size}\n          height={size}\n          viewBox=\"0 0 24 24\"\n          fill=\"none\"\n          overflow=\"hidden\"\n        >\n          <path\n            d=\"M18 14.8135V9.18646C18 6.04126 18 4.46866 17.074 4.0773C16.1481 3.68593 15.0583 4.79793 12.8787 7.02192C11.7499 8.17365 11.1059 8.42869 9.5 8.42869C8.3879 8.42869 7.02749 8.28131 6.33706 9.33566C6 9.85038 6 10.5669 6 12C6 13.4331 6 14.1496 6.33706 14.6643C7.02749 15.7187 8.3879 15.5713 9.5 15.5713C11.106 15.5713 11.7499 15.8264 12.8787 16.9781C15.0583 19.2021 16.1481 20.3141 17.074 19.9227C18 19.5313 18 17.9587 18 14.8135Z\"\n            stroke=\"currentColor\"\n            strokeLinecap=\"round\"\n            strokeLinejoin=\"round\"\n            strokeWidth=\"1.5\"\n          />\n          <motion.path\n            d={MUTE_MARK}\n            stroke=\"currentColor\"\n            strokeLinecap=\"round\"\n            strokeWidth=\"1.5\"\n            variants={departingMuteVariants}\n            animate={controls}\n            initial=\"normal\"\n          />\n          <motion.g\n            variants={generatedGeometryVariants}\n            animate={controls}\n            initial=\"normal\"\n          >\n            <motion.path\n              d={SOUND_WAVE}\n              stroke=\"currentColor\"\n              strokeLinecap=\"round\"\n              strokeLinejoin=\"round\"\n              strokeWidth=\"1.5\"\n              variants={soundWaveVariants}\n              animate={controls}\n              initial=\"normal\"\n            />\n            <motion.path\n              d={MUTE_MARK}\n              stroke=\"currentColor\"\n              strokeLinecap=\"round\"\n              strokeWidth=\"1.5\"\n              variants={arrivingMuteVariants}\n              animate={controls}\n              initial=\"normal\"\n            />\n          </motion.g>\n        </svg>\n      </div>\n    );\n  }\n);\n\nVolumeMute01Icon.displayName = 'VolumeMute01Icon';\n\nexport { VolumeMute01Icon };\n",
      "type": "registry:ui"
    },
    {
      "path": "lib/use-icon-animation.ts",
      "content": "'use client';\n\nimport type { LegacyAnimationControls } from 'motion/react';\nimport { useReducedMotion } from 'motion/react';\nimport type {\n  ForwardedRef,\n  MouseEventHandler,\n} from 'react';\nimport { useCallback, useImperativeHandle, useRef } from 'react';\n\nexport interface AnimatedIconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface UseIconAnimationOptions {\n  controls: LegacyAnimationControls;\n  loops?: boolean;\n  onMouseEnter?: MouseEventHandler<HTMLDivElement>;\n  onMouseLeave?: MouseEventHandler<HTMLDivElement>;\n  ref: ForwardedRef<AnimatedIconHandle>;\n}\n\nexport function useIconAnimation({\n  controls,\n  loops = false,\n  onMouseEnter,\n  onMouseLeave,\n  ref,\n}: UseIconAnimationOptions) {\n  const shouldReduceMotion = useReducedMotion();\n  const isControlledRef = useRef(false);\n  const isPlayingRef = useRef(false);\n  const runRef = useRef(0);\n\n  const startAnimation = useCallback(() => {\n    if (shouldReduceMotion || isPlayingRef.current) return;\n\n    isPlayingRef.current = true;\n    const run = ++runRef.current;\n    controls.set('normal');\n    void controls.start('animate').then(() => {\n      if (runRef.current === run) isPlayingRef.current = false;\n    });\n  }, [controls, shouldReduceMotion]);\n\n  const stopAnimation = useCallback(() => {\n    if (!loops) return;\n\n    runRef.current++;\n    isPlayingRef.current = false;\n    void controls.start('normal');\n  }, [controls, loops]);\n\n  useImperativeHandle(\n    ref,\n    () => {\n      isControlledRef.current = true;\n      return { startAnimation, stopAnimation };\n    },\n    [startAnimation, stopAnimation]\n  );\n\n  const handleMouseEnter = useCallback<MouseEventHandler<HTMLDivElement>>(\n    (event) => {\n      onMouseEnter?.(event);\n      if (!isControlledRef.current) startAnimation();\n    },\n    [onMouseEnter, startAnimation]\n  );\n\n  const handleMouseLeave = useCallback<MouseEventHandler<HTMLDivElement>>(\n    (event) => {\n      onMouseLeave?.(event);\n      if (!isControlledRef.current) stopAnimation();\n    },\n    [onMouseLeave, stopAnimation]\n  );\n\n  return { handleMouseEnter, handleMouseLeave };\n}\n",
      "type": "registry:lib"
    }
  ],
  "type": "registry:ui"
}