{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "voice-chat-disclosure-base",
  "type": "registry:component",
  "title": "Voice Chat Disclosure (base)",
  "description": "Theme-ready base variant of An interactive, expandable voice chat pill with avatar stacking and animated voice indicators..",
  "dependencies": [
    "@hugeicons/core-free-icons",
    "@hugeicons/react",
    "motion",
    "react-icons"
  ],
  "files": [
    {
      "path": "components/watermelon/voice-chat-disclosure.tsx",
      "type": "registry:component",
      "content": "'use client';\n\nimport React, { useState, type ReactNode } from 'react';\nimport { motion, AnimatePresence, MotionConfig } from 'motion/react';\nimport { IoChevronDown } from 'react-icons/io5';\nimport { HugeiconsIcon } from '@hugeicons/react';\nimport { Cancel01Icon } from '@hugeicons/core-free-icons';\n\nexport interface User {\n  id: number;\n  name: string;\n  img: string;\n  active?: boolean;\n}\n\ntype IconRenderer = (props?: any) => ReactNode;\n\ninterface VoiceChatDisclosureProps {\n  users?: User[];\n  title?: string;\n  ctaText?: string;\n  helperText?: string;\n  closeIcon?: IconRenderer;\n}\n\nconst DEFAULT_USERS: User[] = [\n  {\n    id: 1,\n    name: 'Oğuz',\n    img: 'https://i.pravatar.cc/150?u=oguz',\n    active: true,\n  },\n  { id: 2, name: 'Ashish', img: 'https://i.pravatar.cc/150?u=ashish' },\n  { id: 3, name: 'Mariana', img: 'https://i.pravatar.cc/150?u=mariana' },\n  { id: 4, name: 'MDS', img: 'https://i.pravatar.cc/150?u=mds' },\n  { id: 5, name: 'Ana', img: 'https://i.pravatar.cc/150?u=ana' },\n  {\n    id: 6,\n    name: 'Natko',\n    img: 'https://i.pravatar.cc/150?u=natko',\n    active: true,\n  },\n];\n\nexport const VoiceChatDisclosure: React.FC<VoiceChatDisclosureProps> = ({\n  users = DEFAULT_USERS,\n  title = 'Voice Chat',\n  ctaText = 'Join Now',\n  helperText = 'Mic will be muted initially.',\n  closeIcon = (props) => (\n    <HugeiconsIcon icon={Cancel01Icon} size={20} strokeWidth={2} {...props} />\n  ),\n}) => {\n  const [isOpen, setIsOpen] = useState(false);\n  const bars = [0, 1, 2, 3];\n\n  return (\n    <MotionConfig\n      transition={{ type: 'spring', bounce: 0, visualDuration: 0.32 }}\n    >\n      <motion.div layout className=\"relative theme-injected font-sans\">\n        <AnimatePresence mode=\"popLayout\">\n          {!isOpen && (\n            <motion.div\n              layout=\"position\"\n              className=\"absolute -top-4 -left-4 z-20 flex h-10 w-10 items-center justify-center rounded-4xl bg-primary shadow-lg\"\n              initial={{ opacity: 0 }}\n              animate={{ opacity: 1 }}\n              exit={{ opacity: 0 }}\n            >\n              <div className=\"flex items-center gap-[3px]\">\n                {bars.map((i) => (\n                  <motion.div\n                    key={i}\n                    className=\"w-[2.5px] rounded-full bg-primary-foreground\"\n                    initial={{ height: 6 }}\n                    animate={{ height: [2, 16, 6] }}\n                    transition={{\n                      duration: 1,\n                      repeat: Infinity,\n                      delay: i * 0.15,\n                    }}\n                  />\n                ))}\n              </div>\n            </motion.div>\n          )}\n        </AnimatePresence>\n\n        <motion.div\n          layout\n          onClick={() => !isOpen && setIsOpen(true)}\n          className=\"cursor-pointer overflow-hidden border border-border bg-card shadow-xl\"\n          style={{\n            width: isOpen ? 'min(320px, calc(100vw - 32px))' : 280,\n            height: isOpen ? 'auto' : 90,\n            borderRadius: isOpen ? 32 : 44,\n          }}\n        >\n          <AnimatePresence mode=\"popLayout\" initial={false}>\n            {!isOpen ? (\n              <div className=\"flex h-[90px] items-center px-6\">\n                <div className=\"flex -space-x-3\">\n                  {users.slice(0, 4).map((user, idx) => (\n                    <motion.div\n                      key={user.id}\n                      layoutId={`avatar-${user.id}`}\n                      style={{ zIndex: 10 - idx }}\n                    >\n                      <motion.img\n                        layoutId={`avatar-img-${user.id}`}\n                        src={user.img}\n                        className=\"h-14 w-14 rounded-full border-4 border-background object-cover shadow-lg\"\n                      />\n                    </motion.div>\n                  ))}\n                </div>\n\n                <div className=\"ml-4 flex items-center gap-1 font-sans text-lg font-medium text-muted-foreground\">\n                  <span>+{users.length - 4}</span>\n                  <IoChevronDown />\n                </div>\n              </div>\n            ) : (\n              <motion.div layout className=\"flex flex-col\">\n                <div className=\"flex items-center justify-between border-b border-border bg-muted px-4 py-3 sm:px-8\">\n                  <div className=\"w-8\" />\n                  <h2 className=\"font-sans text-base font-semibold text-foreground sm:text-lg truncate\">\n                    {title}\n                  </h2>\n                  <button\n                    onClick={(e) => {\n                      e.stopPropagation();\n                      setIsOpen(false);\n                    }}\n                    className=\"rounded-full bg-background p-2 text-muted-foreground transition-colors hover:text-foreground\"\n                  >\n                    {closeIcon({\n                      className: 'text-current size-4 sm:size-5',\n                    })}\n                  </button>\n                </div>\n\n                <div className=\"grid grid-cols-4 gap-y-6 px-4 py-6 sm:gap-y-8 sm:px-6\">\n                  {users.map((user) => (\n                    <motion.div\n                      key={user.id}\n                      layoutId={`avatar-${user.id}`}\n                      className=\"relative flex flex-col items-center gap-2\"\n                    >\n                      <div className=\"relative\">\n                        <motion.img\n                          layoutId={`avatar-img-${user.id}`}\n                          src={user.img}\n                          className=\"h-11 w-11 rounded-full border border-border object-cover shadow-md sm:h-[56px] sm:w-[56px]\"\n                        />\n\n                        {user.active && (\n                          <motion.div className=\"absolute -top-2 -right-2 flex h-6 w-6 items-center justify-center rounded-full bg-background shadow-xl sm:-top-3 sm:-right-3 sm:h-8 sm:w-8\">\n                            <div className=\"flex items-center gap-[2px]\">\n                              {bars.map((i) => (\n                                <motion.div\n                                  key={i}\n                                  className=\"w-[1.5px] rounded-full bg-muted-foreground sm:w-[2px]\"\n                                  animate={{ height: [2, 10, 6] }}\n                                  transition={{\n                                    duration: 1,\n                                    repeat: Infinity,\n                                    delay: i * 0.2,\n                                  }}\n                                />\n                              ))}\n                            </div>\n                          </motion.div>\n                        )}\n                      </div>\n\n                      <span className=\"font-sans text-[11px] font-semibold text-muted-foreground sm:text-sm truncate w-full text-center px-1\">\n                        {user.name}\n                      </span>\n                    </motion.div>\n                  ))}\n                </div>\n\n                <div className=\"px-4 pb-6 sm:px-6\">\n                  <button className=\"w-full rounded-4xl bg-primary py-2.5 font-sans text-base font-semibold text-primary-foreground transition active:scale-[0.98] sm:py-3 sm:text-lg\">\n                    {ctaText}\n                  </button>\n                  <p className=\"mt-3 text-center font-sans text-xs text-muted-foreground sm:mt-4 sm:text-sm\">\n                    {helperText}\n                  </p>\n                </div>\n              </motion.div>\n            )}\n          </AnimatePresence>\n        </motion.div>\n      </motion.div>\n    </MotionConfig>\n  );\n};\n"
    }
  ]
}
