{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "notification-off-01",
  "title": "notification-off-01",
  "description": "Animated notification off icon",
  "dependencies": [
    "motion"
  ],
  "files": [
    {
      "path": "icons/notification-off-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 NotificationOff01IconHandle {\n  startAnimation: () => void;\n  stopAnimation: () => void;\n}\n\ninterface NotificationOff01IconProps extends HTMLAttributes<HTMLDivElement> {\n  size?: number;\n}\n\n// rest-parity: split-source-path\n\nconst NOTIFICATION_OFF_TOP_RIGHT =\n  'M21 16.2311C21 15.762 20.8136 15.3121 20.4819 14.9803L19.8787 14.3771C19.3161 13.8145 19 13.0514 19 12.2558V9.5C19 5.634 15.866 2.5 12 2.5C10.4497 2.5 9.01706 3.00399 7.85707 3.85707';\nconst NOTIFICATION_OFF_BOTTOM_LEFT =\n  'M4.76887 18C3.79195 18 3 17.208 3 16.2311C3 15.762 3.18636 15.3121 3.51809 14.9803L4.12132 14.3771C4.68393 13.8145 5 13.0514 5 12.2558V9.5C5 8.20839 5.34981 6.99849 5.95987 5.95987';\nconst NOTIFICATION_TOP_CONTINUATION =\n  'M5.95987 5.95987C6.441 5.031 7.077 4.325 7.85707 3.85707';\nconst NOTIFICATION_RIGHT_CONTINUATION =\n  'M21 16.2311C21 17.208 20.208 18 19.2311 18H18';\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 NotificationOff01Icon = forwardRef<NotificationOff01IconHandle, NotificationOff01IconProps>(\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=\"M15.5 18C15.5 19.933 13.933 21.5 12 21.5C10.067 21.5 8.5 19.933 8.5 18\"\n            stroke=\"currentColor\"\n            strokeLinecap=\"round\"\n            strokeLinejoin=\"round\"\n            strokeWidth=\"1.5\"\n          />\n          <motion.path\n            d=\"M2 2L22 22\"\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={NOTIFICATION_OFF_TOP_RIGHT}\n            stroke=\"currentColor\"\n            strokeLinecap=\"round\"\n            strokeLinejoin=\"round\"\n            strokeWidth=\"1.5\"\n          />\n          <path\n            d={NOTIFICATION_OFF_BOTTOM_LEFT}\n            stroke=\"currentColor\"\n            strokeLinecap=\"round\"\n            strokeLinejoin=\"round\"\n            strokeWidth=\"1.5\"\n          />\n          <motion.path\n            d=\"M5.95987 5.95987L18 18\"\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=\"M18 18H4.76887\"\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={NOTIFICATION_TOP_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={NOTIFICATION_RIGHT_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=\"M2 2L22 22\"\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.path\n              d=\"M5.95987 5.95987L18 18\"\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\nNotificationOff01Icon.displayName = 'NotificationOff01Icon';\n\nexport { NotificationOff01Icon };\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"
}