{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "headphone-off",
  "type": "registry:ui",
  "title": "headphone-off",
  "description": "Animated headphone off icon for Vue",
  "dependencies": [
    "motion-v"
  ],
  "files": [
    {
      "path": "components/ui/headphone-off.vue",
      "type": "registry:ui",
      "content": "<script setup lang=\"ts\">\nimport { motion, useAnimationControls } from 'motion-v'\nimport type { Variants } from 'motion-v'\nimport { useIconAnimation } from '../composables/useIconAnimation'\nimport type { AnimatedIconHandle } from '../types'\n\ndefineOptions({ inheritAttrs: false, name: 'HeadphoneOffIcon' })\n\nwithDefaults(\n  defineProps<{\n    size?: number\n  }>(),\n  { size: 28 },\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 controls = useAnimationControls()\nconst { onMouseEnter, onMouseLeave, startAnimation, stopAnimation } = useIconAnimation({\n  controls,\n  loops: false,\n})\n\ndefineExpose<AnimatedIconHandle>({ startAnimation, stopAnimation })\n</script>\n\n<template>\n  <div class=\"hia-icon\" @mouseenter=\"onMouseEnter\" @mouseleave=\"onMouseLeave\" v-bind=\"$attrs\">\n          <svg xmlns=\"http://www.w3.org/2000/svg\" :width=\"size\" :height=\"size\" viewBox=\"0 0 24 24\" fill=\"none\" overflow=\"hidden\">\n            <path 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\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" />\n            <motion.path d=\"M3 2.99976L21 20.9998\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"departingSlashVariants\" :animate=\"controls\" initial=\"normal\" />\n            <path 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\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" />\n            <path 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\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" />\n            <motion.g :variants=\"generatedGeometryVariants\" :animate=\"controls\" initial=\"normal\">\n              <motion.path :d=\"HEADBAND_CONTINUATION\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"leadingContinuationVariants\" :animate=\"controls\" initial=\"normal\" />\n              <motion.path :d=\"RIGHT_EARCUP_CONTINUATION\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"trailingContinuationVariants\" :animate=\"controls\" initial=\"normal\" />\n              <motion.path d=\"M3 2.99976L21 20.9998\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"arrivingSlashVariants\" :animate=\"controls\" initial=\"normal\" />\n            </motion.g>\n          </svg>\n        </div>\n</template>\n"
    },
    {
      "path": "composables/useIconAnimation.ts",
      "type": "registry:lib",
      "content": "import { ref, toValue, type MaybeRefOrGetter } from 'vue'\nimport type { AnimatedIconHandle } from '../types'\n\nexport type IconPose = 'normal' | 'animate'\n\ntype AnimationControls = {\n  set: (variant: IconPose | Record<string, unknown>) => void\n  start: (variant: IconPose | Record<string, unknown>) => Promise<unknown>\n}\n\nexport function useReducedMotionFlag(\n  reduced?: MaybeRefOrGetter<boolean | undefined>,\n) {\n  if (typeof window === 'undefined') return () => false\n  return () => {\n    const override = reduced === undefined ? undefined : toValue(reduced)\n    if (override !== undefined) return override\n    return window.matchMedia('(prefers-reduced-motion: reduce)').matches\n  }\n}\n\nexport function useIconAnimation(options: {\n  controls: AnimationControls\n  loops?: boolean\n}): AnimatedIconHandle & {\n  onMouseEnter: () => void\n  onMouseLeave: () => void\n} {\n  const { controls, loops = false } = options\n  const isPlaying = ref(false)\n  let run = 0\n\n  const prefersReduced = () =>\n    typeof window !== 'undefined' &&\n    window.matchMedia('(prefers-reduced-motion: reduce)').matches\n\n  async function startAnimation() {\n    if (prefersReduced() || isPlaying.value) return\n\n    isPlaying.value = true\n    const current = ++run\n    controls.set('normal')\n    await controls.start('animate')\n    if (run === current) isPlaying.value = false\n  }\n\n  function stopAnimation() {\n    if (!loops) return\n    run += 1\n    isPlaying.value = false\n    void controls.start('normal')\n  }\n\n  return {\n    startAnimation,\n    stopAnimation,\n    onMouseEnter: () => {\n      void startAnimation()\n    },\n    onMouseLeave: () => {\n      stopAnimation()\n    },\n  }\n}\n"
    },
    {
      "path": "types/animated-icon.ts",
      "type": "registry:lib",
      "content": "export interface AnimatedIconHandle {\n  startAnimation: () => void\n  stopAnimation: () => void\n}\n\nexport interface AnimatedIconProps {\n  size?: number\n}\n"
    }
  ]
}
