{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "gooey-menu",
  "type": "registry:component",
  "title": "Gooey Menu",
  "description": "An interactive Next.js logo with expandable tooltip that shows framework information.",
  "dependencies": [
    "motion"
  ],
  "files": [
    {
      "path": "components/watermelon/gooey-menu.tsx",
      "type": "registry:component",
      "content": "'use client';\n\nimport { useState } from 'react';\nimport { motion, AnimatePresence, type Variants } from 'motion/react';\n\ninterface GooeyMenuProps {\n  data: GooeyMenuData[];\n}\n\ninterface GooeyMenuData {\n  key: string;\n  label: string;\n  value: string;\n  labelClass: string;\n  valueClass: string;\n}\n\nconst DIMENSIONS = {\n  min: 40,\n  max: 200,\n};\n\nconst DEFAULT_DATA: GooeyMenuData[] = [\n  {\n    key: 'title',\n    label: 'Next.js',\n    value: 'v13.4.8',\n    labelClass: 'text-sm font-medium text-neutral-500',\n    valueClass: 'text-sm text-neutral-500',\n  },\n  {\n    key: 'errors',\n    label: 'Errors',\n    value: '20',\n    labelClass: 'text-sm font-medium',\n    valueClass:\n      'text-sm flex items-center justify-center rounded-full border border-[#EB5757]/10 bg-[#EB5757]/15 p-1 px-2 font-mono text-red-500 bg-red-500/20',\n  },\n  {\n    key: 'route',\n    label: 'Route',\n    value: 'Static',\n    labelClass: 'text-sm font-medium',\n    valueClass: 'text-sm text-[#a09f9f]',\n  },\n];\n\nconst menuVariants: Variants = {\n  closed: {\n    y: 0,\n    borderRadius: 20,\n    width: DIMENSIONS.min,\n    height: DIMENSIONS.min,\n    z: -10,\n    transition: {\n      // duration: 0.4,\n      // ease: [0.22, 1, 0.36, 1],\n      type: 'spring',\n      stiffness: 300,\n      damping: 30,\n      y: { delay: 0.15 },\n      width: { delay: 0 },\n      height: { delay: 0 },\n    },\n  },\n  open: {\n    y: -50,\n    borderRadius: 10,\n    width: DIMENSIONS.max,\n    height: 'auto',\n    transition: {\n      // duration: 0.4,\n      // ease: [0.22, 1, 0.36, 1],\n      type: 'spring',\n      stiffness: 300,\n      damping: 30,\n      width: { delay: 0.15 },\n      height: { delay: 0.15 },\n      borderRadius: { delay: 0.15 },\n    },\n  },\n};\n\nexport function GooeyMenu({ data = DEFAULT_DATA }: GooeyMenuProps) {\n  const [isOpen, setIsOpen] = useState(false);\n\n  return (\n    <div className=\"relative flex h-full min-h-125 w-full items-center justify-center  bg-transparent\">\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        className=\"absolute bottom-0 left-0\"\n        version=\"1.1\"\n      >\n        <defs>\n          <filter id=\"goo\">\n            <feGaussianBlur\n              in=\"SourceGraphic\"\n              stdDeviation=\"4.4\"\n              result=\"blur\"\n            />\n            <feColorMatrix\n              in=\"blur\"\n              mode=\"matrix\"\n              values=\"1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 20 -7\"\n              result=\"SkiperGooeyFilter\"\n            />\n            <feBlend in=\"SourceGraphic\" in2=\"goo\" />\n          </filter>\n        </defs>\n      </svg>\n\n      <div style={{ filter: 'url(#goo)' }} className=\"absolute\">\n        <motion.button\n          onMouseEnter={() => setIsOpen(true)}\n          onMouseLeave={() => setIsOpen(false)}\n          onClick={() => setIsOpen(!isOpen)}\n          className=\"relative z-20 flex size-10 cursor-pointer items-center justify-center rounded-full border-none bg-black dark:bg-neutral-800\"\n        >\n          <svg width=\"32\" height=\"32\" viewBox=\"0 0 180 180\" fill=\"none\">\n            <path\n              d=\"M149.508 157.52L69.142 54H54V125.97H66.1136V69.356L137.352 160.6Z\"\n              className=\"fill-white dark:fill-white\"\n            />\n            <path\n              d=\"M115.352 54H127.466V125.97H115.352V54Z\"\n              className=\"fill-white dark:fill-white\"\n            />\n          </svg>\n        </motion.button>\n\n        <AnimatePresence>\n          {isOpen && (\n            <motion.div\n              key=\"menu-content\"\n              variants={menuVariants}\n              initial=\"closed\"\n              animate=\"open\"\n              exit=\"closed\"\n              className=\"absolute bottom-0 overflow-hidden bg-black dark:bg-neutral-800\"\n            >\n              <motion.div\n                className=\"grid w-[200px] space-y-2 p-4\"\n                initial={{ opacity: 0 }}\n                animate={{ opacity: 1 }}\n                exit={{ opacity: 0, transition: { duration: 0.1 } }}\n                transition={{ duration: 0.2, delay: 0.15 }}\n              >\n                {data.map((item, index) => (\n                  <motion.div\n                    key={item.key}\n                    className=\"flex items-center justify-between text-white\"\n                    initial={{ opacity: 0, y: 6 }}\n                    animate={{ opacity: 1, y: 0 }}\n                    exit={{ opacity: 0, y: 4 }}\n                    transition={{\n                      duration: 0.25,\n                      delay: 0.1 + index * 0.05,\n                    }}\n                  >\n                    <span className={item.labelClass}>{item.label}</span>\n                    <span className={item.valueClass}>{item.value}</span>\n                  </motion.div>\n                ))}\n              </motion.div>\n            </motion.div>\n          )}\n        </AnimatePresence>\n      </div>\n    </div>\n  );\n}\n"
    }
  ]
}
