import { Brain, Landmark, Rocket, Sparkles } from 'lucide-react' interface BeginnerGuideCardsProps { language: string claw402Ready: boolean exchangeReady: boolean strategyReady: boolean traderReady: boolean canCreateTrader: boolean walletAddress?: string | null onQuickSetupClaw402: () => void onOpenExchange: () => void onOpenStrategy: () => void onCreateTrader: () => void } function truncateAddress(address: string) { if (address.length <= 12) return address return `${address.slice(0, 6)}...${address.slice(-4)}` } export function BeginnerGuideCards({ language, claw402Ready, exchangeReady, strategyReady, traderReady, canCreateTrader, walletAddress, onQuickSetupClaw402, onOpenExchange, onOpenStrategy, onCreateTrader, }: BeginnerGuideCardsProps) { const isZh = language === 'zh' const cards = [ { key: 'model', icon: Brain, title: isZh ? '1. 极速模型' : '1. Fast AI', desc: isZh ? '默认就是 Claw402 + DeepSeek。第一次不用挑模型,先跑起来。' : 'Start with Claw402 + DeepSeek. No model picking needed for the first run.', meta: walletAddress ? isZh ? `钱包 ${truncateAddress(walletAddress)}` : `Wallet ${truncateAddress(walletAddress)}` : isZh ? 'Base 链 USDC 按次付费' : 'Pay per call with Base USDC', ready: claw402Ready, actionLabel: claw402Ready ? isZh ? '已配置' : 'Configured' : isZh ? '一键配置' : 'One-click setup', onAction: onQuickSetupClaw402, disabled: claw402Ready, }, { key: 'exchange', icon: Landmark, title: isZh ? '2. 连接交易所' : '2. Add Exchange', desc: isZh ? '交易所接好以后,AI 才能真正下单。' : 'Connect an exchange so the AI can actually place trades.', meta: exchangeReady ? isZh ? '已准备好' : 'Ready' : isZh ? 'Binance / OKX / Bybit / Hyperliquid' : 'Binance / OKX / Bybit / Hyperliquid', ready: exchangeReady, actionLabel: exchangeReady ? isZh ? '继续管理' : 'Manage' : isZh ? '去配置' : 'Configure', onAction: onOpenExchange, disabled: false, }, { key: 'strategy', icon: Sparkles, title: isZh ? '3. 选择策略' : '3. Pick Strategy', desc: isZh ? '先用默认策略也可以,后面再慢慢细调。' : 'You can start with a default strategy and fine-tune later.', meta: strategyReady ? isZh ? '已有策略可用' : 'Strategy ready' : isZh ? '可选,但建议提前看一眼' : 'Optional, but worth a quick look', ready: strategyReady, actionLabel: isZh ? '打开策略页' : 'Open strategy', onAction: onOpenStrategy, disabled: false, }, { key: 'trader', icon: Rocket, title: isZh ? '4. 创建 Trader' : '4. Create Trader', desc: isZh ? '最后一步,把模型和交易所绑在一起,就能开始运行。' : 'Last step: bind your model and exchange, then start running.', meta: traderReady ? isZh ? '已创建 Trader,可继续添加' : 'Trader created, you can add more' : canCreateTrader ? isZh ? '已经可以创建' : 'Ready to create' : isZh ? '先完成前三步' : 'Finish the first three steps first', ready: traderReady, actionLabel: traderReady ? isZh ? '继续创建' : 'Create another' : isZh ? '立即创建' : 'Create now', onAction: onCreateTrader, disabled: !canCreateTrader, }, ] return (
{isZh ? '新手引导' : 'Quickstart'}

{isZh ? '先按这 4 步走,最快上手' : 'Follow these 4 steps to get started fast'}

{/*
{isZh ? '老手模式不会看到这块' : 'Hidden in advanced mode'}
*/}
{cards.map((card) => { const Icon = card.icon return (
{card.ready ? isZh ? '已就绪' : 'Ready' : isZh ? '待完成' : 'Pending'}

{card.title}

{card.desc}

{card.meta}
) })}
) }