{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "headphone-off",
  "title": "headphone-off",
  "description": "Animated headphone off icon",
  "dependencies": [
    "motion"
  ],
  "files": [
    {
      "path": "icons/headphone-off.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 HeadphoneOffIconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface HeadphoneOffIconProps extends HTMLAttributes<HTMLDivElement> {\n  size?: number;\n}\n\nconst HEADBAND_CONTINUATION =\n  'M5.63604 5.63579C6.302 4.969 7.084 4.402 7.95702 3.95678';\nconst RIGHT_EARCUP_CONTINUATION =\n  'M16.2065 16.2068L16.7614 14.6127C16.9466 14.1466 17.5383 13.9131 18.0251 14.0297C19.5356 14.5333 20.3538 16.1718 19.8526 17.6895L19.4146 19.0158C19.385 19.121 19.348 19.217 19.3028 19.3031';\n\nconst OFF_DURATION = 1.12;\nconst OFF_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 departingSlashVariants: 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: { duration: OFF_DURATION, ease: 'linear', times: OFF_TIMES },\n  },\n};\n\nconst leadingContinuationVariants: 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.12, 0.62, 1, 1, 1, 1, 1, 0.62, 0.2, 0, 0, 0],\n    transition: { duration: OFF_DURATION, ease: 'linear', times: OFF_TIMES },\n  },\n};\n\nconst trailingContinuationVariants: 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: { duration: OFF_DURATION, ease: 'linear', times: OFF_TIMES },\n  },\n};\n\nconst arrivingSlashVariants: 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: { duration: OFF_DURATION, ease: 'linear', times: OFF_TIMES },\n  },\n};\n\nconst generatedGeometryVariants: Variants = {\n  normal: { visibility: 'hidden', transition: { duration: 0 } },\n  animate: { visibility: 'visible', transition: { duration: 0 } },\n};\n\nconst HeadphoneOffIcon = forwardRef<HeadphoneOffIconHandle, HeadphoneOffIconProps>(\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=\"M8.97651 19.6041L7.23857 14.6125C7.05341 14.1464 6.4617 13.9128 5.97493 14.0295C4.46441 14.533 3.6462 16.1716 4.14742 17.6892L4.58543 19.0155C5.08664 20.5332 6.71747 21.3552 8.22799 20.8516C8.68896 20.6553 9.10449 20.0895 8.97651 19.6041Z\"\n            stroke=\"currentColor\"\n            strokeLinecap=\"round\"\n            strokeLinejoin=\"round\"\n            strokeWidth=\"1.5\"\n          />\n          <motion.path\n            d=\"M3 2.99976L21 20.9998\"\n            stroke=\"currentColor\"\n            strokeLinecap=\"round\"\n            strokeLinejoin=\"round\"\n            strokeWidth=\"1.5\"\n            variants={departingSlashVariants}\n            animate={controls}\n            initial=\"normal\"\n          />\n          <path\n            d=\"M16.2065 16.2068L15.0235 19.6046C14.8955 20.09 15.311 20.6558 15.772 20.8522C17.1843 21.323 18.7018 20.635 19.3028 19.3031\"\n            stroke=\"currentColor\"\n            strokeLinecap=\"round\"\n            strokeLinejoin=\"round\"\n            strokeWidth=\"1.5\"\n          />\n          <path\n            d=\"M3.91512 16.9998C3.41512 15.4998 3 13.4366 3 11.9998C3 9.51447 4.00736 7.26447 5.63604 5.63579M7.95702 3.95678C9.17263 3.34453 10.546 2.99976 12 2.99976C16.9706 2.99976 21 7.02919 21 11.9998C21 13.2238 20.6987 14.9024 20.3004 16.3001\"\n            stroke=\"currentColor\"\n            strokeLinecap=\"round\"\n            strokeLinejoin=\"round\"\n            strokeWidth=\"1.5\"\n          />\n          <motion.g\n            variants={generatedGeometryVariants}\n            animate={controls}\n            initial=\"normal\"\n          >\n            <motion.path\n              d={HEADBAND_CONTINUATION}\n              stroke=\"currentColor\"\n              strokeLinecap=\"round\"\n              strokeLinejoin=\"round\"\n              strokeWidth=\"1.5\"\n              variants={leadingContinuationVariants}\n              animate={controls}\n              initial=\"normal\"\n            />\n            <motion.path\n              d={RIGHT_EARCUP_CONTINUATION}\n              stroke=\"currentColor\"\n              strokeLinecap=\"round\"\n              strokeLinejoin=\"round\"\n              strokeWidth=\"1.5\"\n              variants={trailingContinuationVariants}\n              animate={controls}\n              initial=\"normal\"\n            />\n            <motion.path\n              d=\"M3 2.99976L21 20.9998\"\n              stroke=\"currentColor\"\n              strokeLinecap=\"round\"\n              strokeLinejoin=\"round\"\n              strokeWidth=\"1.5\"\n              variants={arrivingSlashVariants}\n              animate={controls}\n              initial=\"normal\"\n            />\n          </motion.g>\n        </svg>\n      </div>\n    );\n  }\n);\n\nHeadphoneOffIcon.displayName = 'HeadphoneOffIcon';\n\nexport { HeadphoneOffIcon };\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"
}