'use client'; import { AnimatePresence, motion } from 'framer-motion'; import { useTheme } from '@/contexts/ThemeContext'; import { BookOpen, ShieldCheck, GraduationCap, MessageCircle, Headphones, Users, Briefcase, Mail, Newspaper } from 'lucide-react'; interface ResourceMenuProps { isOpen: boolean; onClose: () => void; language: 'zh' | 'en'; top?: number; } export default function ResourceMenu({ isOpen, onClose, language, top = 64 }: ResourceMenuProps) { const { theme } = useTheme(); const isDark = theme === 'dark'; const content = { zh: { docLearning: '文档与学习', docs: '文档', docsDesc: '阅读技术文档、智能合约参考和集成指南。', docsBadge: '已更新', trustSecurity: '信任与安全', trustSecurityDesc: '查看审计、合规认证和我们的安全实践。', helpSupport: '帮助与支持', learningCenter: '学习中心', learningCenterDesc: '教程与视频指南。', communityForum: '社区论坛', communityForumDesc: '提问与交流。', contactSupport: '联系支持', contactSupportDesc: '从我们的团队获得帮助。', company: '公司', aboutTeam: '关于团队', aboutTeamDesc: '认识AssetX背后的团队。', careers: '招聘', careersDesc: '加入我们不断成长的团队。', contactUs: '联系我们', contactUsDesc: '合作与媒体咨询。', pressMedia: '新闻媒体', pressMediaDesc: '最新消息与品牌资产。', latestUpdate: '最新更新:', updateInfo: 'December 2025', privacyPolicy: '隐私政策', termsOfService: '服务条款', }, en: { docLearning: 'Documentation & Learning', docs: 'Docs', docsDesc: 'Read technical docs, smart contract references, and integration guides.', docsBadge: 'Updated', trustSecurity: 'Trust & Security', trustSecurityDesc: 'Review audits, compliance attestations, and our security practices.', helpSupport: 'Help & Support', learningCenter: 'Learning Center', learningCenterDesc: 'Tutorials & video guides.', communityForum: 'Community Forum', communityForumDesc: 'Ask questions & connect.', contactSupport: 'Contact Support', contactSupportDesc: 'Get help from our team.', company: 'Company', aboutTeam: 'About Team', aboutTeamDesc: 'Meet the people behind AssetX.', careers: 'Careers', careersDesc: 'Join our growing team.', contactUs: 'Contact Us', contactUsDesc: 'Partnerships & media inquiries.', pressMedia: 'Press & Media', pressMediaDesc: 'Latest news & brand assets.', latestUpdate: 'Latest Update:', updateInfo: 'December 2025', privacyPolicy: 'Privacy Policy', termsOfService: 'Terms of Service', }, }; const t = content[language]; const helpItems = [ { Icon: GraduationCap, title: t.learningCenter, desc: t.learningCenterDesc }, { Icon: MessageCircle, title: t.communityForum, desc: t.communityForumDesc }, { Icon: Headphones, title: t.contactSupport, desc: t.contactSupportDesc }, ]; const companyItems = [ { Icon: Users, title: t.aboutTeam, desc: t.aboutTeamDesc }, { Icon: Briefcase, title: t.careers, desc: t.careersDesc }, { Icon: Mail, title: t.contactUs, desc: t.contactUsDesc }, { Icon: Newspaper, title: t.pressMedia, desc: t.pressMediaDesc }, ]; return ( {isOpen && ( <> {/* Transparent backdrop for click-outside */} {/* Menu — centered card */}
{/* Three-column layout */}
{/* Left — Documentation & Learning (large cards) */}
{t.docLearning} {/* Docs card */}
{t.docs}
{t.docsBadge}

{t.docsDesc}

{/* Trust & Security card */}
{t.trustSecurity}

{t.trustSecurityDesc}

{/* Middle — Help & Support */}
{t.helpSupport}
{helpItems.map(({ Icon, title, desc }) => (
{title} {desc}
))}
{/* Right — Company */}
{t.company}
{companyItems.map(({ Icon, title, desc }) => (
{title} {desc}
))}
{/* Bottom bar */}
{t.latestUpdate} {t.updateInfo}
{t.privacyPolicy} {t.termsOfService}
)}
); }