'use client'; import Image from 'next/image'; import { useState, useEffect } from 'react'; interface ResourceMenuProps { isOpen: boolean; onClose: () => void; language: 'zh' | 'en'; } export default function ResourceMenu({ isOpen, onClose, language }: ResourceMenuProps) { const [isVisible, setIsVisible] = useState(false); const [isClosing, setIsClosing] = useState(false); useEffect(() => { if (isOpen) { setIsVisible(true); setIsClosing(false); } else if (isVisible) { // 触发退出动画 setIsClosing(true); // 动画结束后隐藏组件 const timer = setTimeout(() => { setIsVisible(false); setIsClosing(false); }, 300); // 匹配动画时长 return () => clearTimeout(timer); } }, [isOpen, isVisible]); if (!isVisible) return null; 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: '最新消息与品牌资产。', latestAudit: '最新审计:', auditInfo: 'Oct 2025 (Certik)', 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.', latestAudit: 'Latest Audit:', auditInfo: 'Oct 2025 (Certik)', privacyPolicy: 'Privacy Policy', termsOfService: 'Terms of Service' } }; const t = content[language]; return ( <> {/* Backdrop */}
{/* Menu */}
{/* Left Column - Documentation & Learning */}
{/* Section Title */}
{t.docLearning}
{/* Docs Card */}
Docs
{t.docs}
{t.docsBadge}

{t.docsDesc}

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

{t.trustSecurityDesc}

{/* Middle Column - Image + Help & Support */}
{/* Image */}
Resource Showcase
{/* Help & Support */}
{t.helpSupport}
{/* Learning Center */}
Learning Center
{t.learningCenter}

{t.learningCenterDesc}

{/* Community Forum */}
Community Forum
{t.communityForum}

{t.communityForumDesc}

{/* Contact Support */}
Contact Support
{t.contactSupport}

{t.contactSupportDesc}

{/* Right Column - Company */}
{t.company}
{/* About Team */}
About Team
{t.aboutTeam}

{t.aboutTeamDesc}

{/* Careers */}
Careers
{t.careers}

{t.careersDesc}

{/* Contact Us */}
Contact Us
{t.contactUs}

{t.contactUsDesc}

{/* Press & Media */}
Press & Media
{t.pressMedia}

{t.pressMediaDesc}

{/* Bottom Border */}
{t.latestAudit} {t.auditInfo}
{t.privacyPolicy}
{t.termsOfService}
); }