{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "invite-disclosure-base",
  "type": "registry:component",
  "title": "Invite Disclosure (base)",
  "description": "Theme-ready base variant of A sleek, morphing disclosure component for managing invitations with interactive badge counts and spring animations..",
  "dependencies": [
    "motion",
    "react-icons"
  ],
  "files": [
    {
      "path": "components/watermelon/invite-disclosure.tsx",
      "type": "registry:component",
      "content": "import React, { useState, type ReactNode } from 'react';\nimport {\nAnimatePresence,\nmotion,\nMotionConfig,\ntype Transition,\n} from 'motion/react';\nimport { MdOutlineClose } from 'react-icons/md';\nimport { FaFolderClosed } from 'react-icons/fa6';\nimport { LuDraftingCompass } from 'react-icons/lu';\nimport { BiSolidZap } from 'react-icons/bi';\nimport { PiScrewdriverBold } from 'react-icons/pi';\n\nexport interface InviteItem {\nid: string;\ntitle: string;\ndescription: string;\nicon: ReactNode;\nhasUpdate?: boolean;\n}\n\ninterface InviteDisclosureProps {\ntitle?: string;\nbadgeCount?: number;\ninvites?: InviteItem[];\n}\n\nconst DEFAULT_INVITES: InviteItem[] = [\n{\n  id: '1',\n  title: 'Sonora Repository',\n  description: 'Contribute to the code repository',\n  icon: <FaFolderClosed className=\"h-4 w-4 text-muted-foreground\" />,\n  hasUpdate: true,\n},\n{\n  id: '2',\n  title: 'Design Tokens',\n  description: 'Collaborate on design tokens',\n  icon: <LuDraftingCompass className=\"h-5 w-5 text-muted-foreground\" />,\n  hasUpdate: true,\n},\n{\n  id: '3',\n  title: 'Motion Kit',\n  description: 'Contribute to motion components',\n  icon: <BiSolidZap className=\"h-5 w-5 text-muted-foreground\" />,\n},\n{\n  id: '4',\n  title: 'Build Tools',\n  description: 'Explore build tools & pipeline',\n  icon: <PiScrewdriverBold className=\"h-5 w-5 text-muted-foreground\" />,\n},\n];\n\nconst springTransition: Transition = {\ntype: 'spring',\nstiffness: 800,\ndamping: 80,\nmass: 5,\n};\n\nconst collapsedTransition: Transition = {\ntype: 'spring',\nstiffness: 800,\ndamping: 80,\nmass: 4,\n};\n\nexport const InviteDisclosure: React.FC<InviteDisclosureProps> = ({\ntitle = 'Invites',\nbadgeCount = 2,\ninvites = DEFAULT_INVITES,\n}) => {\nconst [isOpen, setIsOpen] = useState(false);\n\nreturn (\n  <div\n    className=\"theme-injected flex min-h-full w-fit items-center justify-center bg-transparent text-foreground font-sans\"\n    style={{ fontFamily: 'var(--font-sans)' }}\n  >\n    <MotionConfig transition={isOpen ? springTransition : collapsedTransition}>\n      <AnimatePresence mode=\"popLayout\" initial={false}>\n        {!isOpen ? (\n          <motion.button\n            layoutId=\"disclosure\"\n            onClick={() => setIsOpen(true)}\n            style={{\n              borderRadius: 32,\n            }}\n            className=\"flex cursor-pointer items-center gap-3 rounded-3xl border border-border bg-card px-6 py-4 text-foreground transition-colors duration-200 hover:bg-accent/40\"\n          >\n            <motion.span\n              layoutId=\"title\"\n              className=\"text-xl font-semibold text-foreground\"\n            >\n              {title}\n            </motion.span>\n            <motion.div\n              layoutId=\"badge\"\n              className=\"flex h-7 w-7 items-center justify-center rounded-full bg-foreground text-sm font-bold text-background\"\n              style={{ fontFamily: 'var(--font-mono)' }}\n            >\n              {badgeCount}\n            </motion.div>\n          </motion.button>\n        ) : (\n          <motion.div\n            layoutId=\"disclosure\"\n            style={{\n              borderRadius: 24,\n            }}\n            className=\"w-80 sm:w-96 rounded-2xl border border-border bg-card p-2 text-card-foreground\"\n          >\n            <div className=\"flex items-center justify-between px-6 pt-4 pb-6\">\n              <motion.h2\n                layoutId=\"title\"\n                className=\"text-2xl font-bold text-foreground\"\n              >\n                {title}\n              </motion.h2>\n              <motion.button\n                layoutId=\"badge\"\n                title=\"close\"\n                onClick={() => setIsOpen(false)}\n                className=\"flex h-8 w-8 items-center justify-center rounded-full bg-background text-muted-foreground transition-colors duration-200 hover:bg-accent\"\n              >\n                <MdOutlineClose className=\"h-5 w-5\" />\n              </motion.button>\n            </div>\n\n            <div className=\"space-y-3 px-2 pb-4\">\n              {invites.map((invite, index) => (\n                <motion.div\n                  key={invite.id}\n                  initial={{ opacity: 0, y: 10 }}\n                  animate={{ opacity: 1, y: 0 }}\n                  whileHover={{ scale: 1.02 }}\n                  transition={{\n                    delay: index * 0.04 + 0.1,\n                    type: 'spring',\n                    stiffness: 260,\n                    damping: 20,\n                  }}\n                  className=\"group flex cursor-pointer items-center gap-4 rounded-xl border border-border bg-background px-3 py-3 transition-all hover:bg-accent/40 hover:shadow-sm\"\n                >\n                  <div className=\"relative\">\n                    <div className=\"flex h-10 w-10 items-center justify-center rounded-full bg-muted/60\">\n                      {invite.icon && React.isValidElement(invite.icon)\n                        ? React.cloneElement(\n                            invite.icon as React.ReactElement<any>,\n                            {\n                              className: `${(invite.icon as React.ReactElement<any>).props.className} text-muted-foreground`,\n                            },\n                          )\n                        : invite.icon}\n                    </div>\n                    {invite.hasUpdate && (\n                      <div className=\"absolute top-0 right-0 h-2.5 w-2.5 rounded-full border-2 border-background bg-foreground\" />\n                    )}\n                  </div>\n\n                  <div className=\"flex-1\">\n                    <h3 className=\"text-base leading-tight font-bold text-foreground\">\n                      {invite.title}\n                    </h3>\n                    <p className=\"text-sm font-medium text-muted-foreground\">\n                      {invite.description}\n                    </p>\n                  </div>\n                </motion.div>\n              ))}\n            </div>\n          </motion.div>\n        )}\n      </AnimatePresence>\n    </MotionConfig>\n  </div>\n);\n};\n"
    }
  ]
}
