{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "meeting-card",
  "type": "registry:component",
  "title": "Meeting Card",
  "description": "Summarize meeting details with time, participants, and quick action controls.",
  "dependencies": [
    "lucide-react",
    "motion"
  ],
  "files": [
    {
      "path": "components/watermelon/meeting-card.tsx",
      "type": "registry:component",
      "content": "\"use client\";\n\nimport React, { useState } from 'react';\nimport { motion, AnimatePresence } from 'motion/react';\nimport {\n    ChevronUp, Calendar, Clock, Bell, Video, Users,\n    Link as LinkIcon, MoreHorizontal\n} from 'lucide-react';\n\ninterface Participant {\n    name: string;\n    avatar: string;\n}\n\ninterface MeetingCardProps {\n    title: string;\n    date: string;\n    time: string;\n    duration: string;\n    meetingLink: string;\n    notification: string;\n    recording?: boolean;\n    aiNotes?: boolean;\n    participants: Participant[];\n    description: string;\n}\n\nexport const MeetingCard: React.FC<MeetingCardProps> = ({\n    title, date, time, duration, meetingLink, notification,\n    participants, description\n}) => {\n    const [expanded, setExpanded] = useState(true);\n    const [theme] = useState<'light' | 'dark'>('light');\n    const [isRecording, setIsRecording] = useState(true);\n    const [isAiEnabled, setIsAiEnabled] = useState(true);\n\n    const spring = { type: 'spring', stiffness: 300, damping: 30 } as const;\n\n    return (\n        <div className={theme === 'dark' ? 'dark' : ''}>\n            <div className=\"w-full mt-12 flex flex-col items-center justify-center p-2 sm:p-6 relative bg-transparent\">\n                <div className=\"w-full max-w-full lg:w-100 lg:max-w-100 \">\n                    <motion.div\n                        layout=\"position\"\n                        transition={spring}\n                        className=\"w-full bg-[#F5F5F7] dark:bg-[#161616] border border-[#E5E5E5] dark:border-white/10 rounded-xl shadow-lg overflow-hidden\"\n                    >\n                        <div\n                            className=\"flex items-center justify-between p-4 cursor-pointer select-none gap-2\"\n                            onClick={() => setExpanded(!expanded)}\n                        >\n                            <div className=\"flex items-center gap-3 min-w-0\">\n                                <div className=\"w-9 h-9 bg-[#BB89FA] rounded-[10px] flex items-center justify-center shrink-0\">\n                                    <Calendar size={18} className=\"text-white\" />\n                                </div>\n                                <div className=\"min-w-0\">\n                                    <p className=\"font-bold text-[14px] text-[#1A1A1A] dark:text-[#EDEDED] truncate\">{title}</p>\n                                    <p className=\"text-[11px] text-[#6B7280] dark:text-gray-500\">Today, {time}</p>\n                                </div>\n                            </div>\n\n                            <div className=\"flex items-center gap-2 sm:gap-3 shrink-0\">\n                                <div className=\"flex -space-x-2 overflow-hidden\">\n                                    {participants.slice(0, 3).map((p, i) => (\n                                        <img key={i} src={p.avatar} className=\"w-6 h-6 rounded-full border-2 border-white dark:border-[#161616] object-cover\" alt={p.name} />\n                                    ))}\n                                </div>\n                                <motion.div\n                                    animate={{ rotate: expanded ? 0 : 180 }}\n                                    className=\"w-8 h-8 rounded-lg border border-[#E5E5E5] dark:border-white/10 flex items-center justify-center text-[#9CA3AF]\"\n                                >\n                                    <ChevronUp size={18} />\n                                </motion.div>\n                            </div>\n                        </div>\n\n                        <AnimatePresence initial={false} mode=\"sync\">\n                            {expanded && (\n                                <motion.div\n                                    initial={{ height: 0, opacity: 0 }}\n                                    animate={{ height: 'auto', opacity: 1 }}\n                                    exit={{ height: 0, opacity: 0 }}\n                                    transition={spring}\n                                    className=\"overflow-hidden\"\n                                >\n                                    <div className=\"p-4 space-y-4 text-[13px] text-[#555D6B] dark:text-gray-400 border-t-[1.4px] border-[#E9E8EF] dark:border-white/5 bg-white dark:bg-[#1C1C1C] rounded-t-[24px]\">\n                                        <Row icon={<Calendar size={15} />} label=\"Date\">\n                                            <Tag>{date}</Tag>\n                                        </Row>\n\n                                        <Row icon={<Clock size={15} />} label=\"Time\">\n                                            <div className=\"flex items-center gap-1 flex-wrap justify-end\">\n                                                <Tag>{time}</Tag>\n                                                <span className='text-[11px] dark:text-gray-500'>to</span>\n                                                <Tag>{duration}</Tag>\n                                            </div>\n                                        </Row>\n\n                                        <Row icon={<Video size={15} />} label=\"Link\">\n                                            <Tag className=\"max-w-30 xs:max-w-[180px] sm:max-w-none\">\n                                                <LinkIcon size={12} className=\"shrink-0\" />\n                                                <span className=\"truncate\">{meetingLink}</span>\n                                            </Tag>\n                                        </Row>\n\n                                        <Row icon={<Bell size={15} />} label=\"Notification\">\n                                            <Tag>{notification}</Tag>\n                                        </Row>\n\n                                        <Row icon={<Video size={15} />} label=\"Recording\">\n                                            <Toggle active={isRecording} onChange={setIsRecording} />\n                                        </Row>\n\n                                        <Row icon={<Users size={15} />} label=\"AI notetaking\">\n                                            <Toggle active={isAiEnabled} onChange={setIsAiEnabled} />\n                                        </Row>\n\n                                        {/* Participants */}\n                                        <div className=\"pt-3 border-t border-[#EFEFEF] dark:border-white/5 space-y-2\">\n                                            <p className=\"text-[12px] font-medium text-[#6B7280] dark:text-gray-500\">Participants</p>\n                                            <div className=\"flex items-center gap-2 flex-wrap\">\n                                                {participants.map((p, i) => (\n                                                    <div key={i} className=\"flex items-center gap-2 px-2 py-1 bg-[#F5F5F7] dark:bg-white/5 border border-[#E5E5E5] dark:border-white/10 rounded-full\">\n                                                        <img src={p.avatar} className=\"w-5 h-5 rounded-full\" alt=\"\" />\n                                                        <span className=\"text-[12px] font-medium text-[#1A1A1A] dark:text-gray-300\">{p.name}</span>\n                                                    </div>\n                                                ))}\n                                            </div>\n                                        </div>\n\n                                        {/* Description */}\n                                        <div className=\"pt-3 border-t border-[#EFEFEF] dark:border-white/5\">\n                                            <p className=\"text-[12px] font-medium text-[#6B7280] dark:text-gray-500 mb-1\">Description</p>\n                                            <p className=\"text-[12px] text-[#4B5563] dark:text-gray-400 leading-relaxed\">{description}</p>\n                                        </div>\n                                    </div>\n\n                                    {/* Footer */}\n                                    <div className=\"p-3 flex flex-wrap items-center justify-between gap-3 bg-[#F5F5F7] dark:bg-[#161616] border-t dark:border-white/5\">\n                                        <p className=\"text-[13px] text-[#6B7280] dark:text-gray-500 font-medium\">Going?</p>\n                                        <div className=\"flex items-center gap-1.5 flex-wrap sm:flex-nowrap\">\n                                            {['Yes', 'No', 'Maybe'].map((opt) => (\n                                                <button\n                                                    key={opt}\n                                                    className=\"px-2.5 sm:px-3 py-1 rounded-full border border-[#E5E5E5] dark:border-white/10 text-[11px] sm:text-[12px] font-medium text-[#374151] dark:text-gray-300 bg-white dark:bg-white/5 active:bg-gray-200 dark:active:bg-white/10 transition-colors\"\n                                                >\n                                                    {opt}\n                                                </button>\n                                            ))}\n                                            <MoreHorizontal size={16} className=\"text-[#9CA3AF] ml-1 cursor-pointer hidden xs:block\" />\n                                        </div>\n                                    </div>\n                                </motion.div>\n                            )}\n                        </AnimatePresence>\n                    </motion.div>\n                </div>\n            </div>\n        </div>\n    );\n};\n\nconst Row = ({ icon, label, children }: { icon: React.ReactNode; label: string; children: React.ReactNode; }) => (\n    <div className=\"flex items-center justify-between gap-2\">\n        <div className=\"flex items-center gap-2 text-[#6B7280] dark:text-gray-500 shrink-0\">\n            {icon}\n            <span className=\"text-[12px] font-medium whitespace-nowrap\">{label}</span>\n        </div>\n        <div className=\"flex-1 flex justify-end min-w-0\">{children}</div>\n    </div>\n);\n\nconst Tag = ({ children, className = \"\" }: { children: React.ReactNode; className?: string }) => (\n    <div className={`flex items-center gap-1 px-2 py-1 rounded-full border border-[#E5E5E5] dark:border-white/10 text-[12px] text-[#374151] dark:text-gray-300 bg-[#FAFAFA] dark:bg-white/5 whitespace-nowrap overflow-hidden ${className}`}>\n        {children}\n    </div>\n);\n\nconst Toggle = ({ active, onChange }: { active: boolean; onChange: (v: boolean) => void; }) => {\n    return (\n        <div\n            onClick={() => onChange(!active)}\n            className={`w-9 h-5 rounded-full px-1 flex items-center cursor-pointer transition-colors duration-200 ${active ? \"bg-[#EAF7EA] dark:bg-green-500/20\" : \"bg-[#F3F4F6] dark:bg-white/10\"\n                }`}\n        >\n            <motion.div\n                layout\n                transition={{ type: \"spring\", stiffness: 500, damping: 30 }}\n                animate={{ x: active ? 16 : 0 }}\n                className={`w-3.5 h-3.5 rounded-full shadow-sm ${active ? \"bg-[#22C55E]\" : \"bg-[#9CA3AF]\"\n                    }`}\n            />\n        </div>\n    );\n};"
    }
  ]
}
