{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "club",
  "type": "registry:ui",
  "title": "club",
  "description": "Animated club icon for Vue",
  "dependencies": [
    "motion-v"
  ],
  "files": [
    {
      "path": "components/ui/club.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: 'ClubIcon' })\n\nwithDefaults(\n  defineProps<{\n    size?: number\n  }>(),\n  { size: 28 },\n)\n\n// after home-01: the silhouette of the club loads onto its base and settles with weight\n// generated from @hugeicons/core-free-icons\nconst iconVariants: Variants = {\n  normal: {\n    transform: 'translateY(0px) scaleY(1)',\n  },\n  animate: {\n    transform: ['translateY(0px) scaleY(1)', 'translateY(1.46px) scaleY(0.82)', 'translateY(-3.54px) scaleY(1.08)', 'translateY(0.52px) scaleY(0.94)', 'translateY(0px) scaleY(1)'],\n    transition: {\n      duration: 0.69,\n      times: [0, 0.18, 0.48, 0.78, 1],\n      ease: [0.23, 1, 0.32, 1],\n    },\n  },\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=\"visible\">\n            <motion.path d=\"M15.956 3.95608C16.417 4.56343 16.7286 5.26848 16.866 6.01542C16.9368 6.3999 16.9514 6.76505 16.9383 7.08512C16.9138 7.67968 16.9016 7.97696 16.988 8.11043C17.0745 8.24391 17.3518 8.35471 17.9063 8.57633C18.2909 8.72998 18.6558 8.93137 18.9919 9.17677C19.6521 9.65876 20.1806 10.2954 20.5298 11.0294C20.879 11.7634 21.038 12.5717 20.9924 13.3815C20.9467 14.1913 20.698 14.9772 20.2685 15.6684C19.839 16.3596 19.2423 16.9344 18.532 17.341C17.8218 17.7476 17.0203 17.9733 16.1998 17.9978C16.097 18.0008 15.9943 18.0007 15.8918 17.9975C14.883 17.9655 14.3786 17.9495 14.2228 18.1292C14.2121 18.1415 14.2076 18.1471 14.1979 18.1602C14.0569 18.3517 14.1604 18.7521 14.3674 19.553C14.6515 20.6518 14.7935 21.2013 14.5226 21.5809C14.5075 21.6021 14.4915 21.6227 14.4748 21.6427C14.175 22 13.6075 22 12.4726 22H11.5329C10.3897 22 9.81807 22 9.51812 21.6375C9.50482 21.6214 9.49203 21.605 9.47976 21.5881C9.20307 21.2075 9.34496 20.6538 9.62874 19.5464C9.83469 18.7427 9.93766 18.3409 9.79388 18.1491C9.78605 18.1386 9.78248 18.1342 9.774 18.1243C9.61832 17.942 9.11242 17.9573 8.10063 17.9878C7.99822 17.9909 7.89555 17.9909 7.79279 17.9877C6.97315 17.962 6.1728 17.7356 5.46367 17.3287C4.75454 16.9217 4.15886 16.3471 3.73016 15.6564C3.30146 14.9657 3.05319 14.1805 3.00764 13.3715C2.9621 12.5625 3.12071 11.755 3.46923 11.0216C3.81775 10.2881 4.34526 9.65176 5.00433 9.16964C5.35144 8.91572 5.72932 8.70879 6.12784 8.55293C6.65479 8.34685 6.91826 8.24381 7.00581 8.10876C7.09336 7.9737 7.07979 7.68934 7.05263 7.12062C7.03503 6.75186 7.05968 6.38108 7.12697 6.01542C7.26442 5.26848 7.57599 4.56343 8.03701 3.95608C8.49803 3.34874 9.09583 2.85579 9.78307 2.51627C10.4703 2.17676 11.2281 2 11.9965 2C12.7649 2 13.5227 2.17676 14.2099 2.51627C14.8971 2.85579 15.495 3.34874 15.956 3.95608Z\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\" :variants=\"iconVariants\" :animate=\"controls\" initial=\"normal\" :style=\"{ transformOrigin: '12px 22px' }\" />\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"
    }
  ]
}
