'use client'; import Image from 'next/image'; import { AnimatePresence, motion } from 'framer-motion'; import { useTheme } from '@/contexts/ThemeContext'; import { Layers, Rocket, ArrowLeftRight, Coins, LayoutDashboard, Radio, Rainbow } from 'lucide-react'; interface ProductMenuProps { isOpen: boolean; onClose: () => void; language: 'zh' | 'en'; top?: number; } export default function ProductMenu({ isOpen, onClose, language, top = 64 }: ProductMenuProps) { const { theme } = useTheme(); const isDark = theme === 'dark'; const content = { zh: { coreYieldAssets: '核心收益资产', axFund: 'AX-Fund', axFundDesc: '购买AX-Fund收益代币,获得市场中性收益策略的敞口。收益随时间在代币价格中累积。', axFundBadge: '最高22% APY', axPool: 'AX-Pool', axPoolDesc: '以ALP提供流动性支持收益代币市场并赚取交易费', axPoolBadge: '多元化', platformsProtocols: '平台与协议', launchpad: 'Launchpad', launchpadDesc: '发行与代币化新RWA', defiMarket: 'DeFi市场', defiMarketDesc: '资产代币的交换与借贷', tokenFactory: 'Token Factory', tokenFactoryDesc: '标准化铸造协议', infrastructure: '基础设施', assetCockpit: 'Asset Cockpit', assetCockpitDesc: '投资组合分析与管理', oracleNetwork: 'Oracle Network', oracleNetworkDesc: '实时链下数据源', latestAudit: '最新审计:', auditInfo: 'Oct 2025 (Certik)', viewDocs: '查看文档 →', }, en: { coreYieldAssets: 'Core Yield Assets', axFund: 'AX-Fund', axFundDesc: 'Buy the AX-Fund Yield Token to gain exposure to market-neutral yield strategies. Yield accrues in token price over time.', axFundBadge: 'up to 22% APY', axPool: 'AX-Pool', axPoolDesc: 'Provide liquidity as ALP to support Yield Token markets and earn trading fees', axPoolBadge: 'Diversified', platformsProtocols: 'Platforms & Protocols', launchpad: 'Launchpad', launchpadDesc: 'Issue & tokenize new RWAs.', defiMarket: 'Defi Market', defiMarketDesc: 'Swap & Lending for assets tokens.', tokenFactory: 'Token Factory', tokenFactoryDesc: 'Standardized minting protocol.', infrastructure: 'Infrastructure', assetCockpit: 'Asset Cockpit', assetCockpitDesc: 'Portfolio analytics & mgmt.', oracleNetwork: 'Oracle Network', oracleNetworkDesc: 'Real-time off-chain data feeds.', latestAudit: 'Latest Audit:', auditInfo: 'Oct 2025 (Certik)', viewDocs: 'View Documentation →', }, }; const t = content[language]; const platformItems = [ { Icon: Rocket, title: t.launchpad, desc: t.launchpadDesc }, { Icon: ArrowLeftRight, title: t.defiMarket, desc: t.defiMarketDesc }, { Icon: Coins, title: t.tokenFactory, desc: t.tokenFactoryDesc }, ]; const infraItems = [ { Icon: LayoutDashboard, title: t.assetCockpit, desc: t.assetCockpitDesc }, { Icon: Radio, title: t.oracleNetwork, desc: t.oracleNetworkDesc }, ]; return ( {isOpen && ( <> {/* Transparent backdrop for click-outside */} {/* Menu — centered card */}
{/* Three-column layout */}
{/* Left — Core Yield Assets (large cards) */}
{t.coreYieldAssets} {/* AX-Fund card */}
{t.axFund}
{t.axFundBadge}

{t.axFundDesc}

{/* AX-Pool card */}
{t.axPool}
{t.axPoolBadge}

{t.axPoolDesc}

{/* Middle — Platforms & Protocols */}
{t.platformsProtocols}
{platformItems.map(({ Icon, title, desc }) => (
{title} {desc}
))}
{/* Right — Infrastructure */}
{t.infrastructure}
{infraItems.map(({ Icon, title, desc }) => (
{title} {desc}
))}
{/* Bottom bar */}
{t.latestAudit} {t.auditInfo}
{t.viewDocs}
)}
); }