import React from 'react' import { Box, Text } from '@anthropic/ink' import type { BattleResult, BattlePokemon } from '../battle/types' const GREEN = 'ansi:green' const RED = 'ansi:red' const YELLOW = 'ansi:yellow' const CYAN = 'ansi:cyan' const WHITE = 'ansi:whiteBright' interface BattleResultPanelProps { result: BattleResult playerPokemon: BattlePokemon onContinue: () => void } export function BattleResultPanel({ result, playerPokemon, onContinue }: BattleResultPanelProps) { const isWin = result.winner === 'player' return ( {' '}战斗结束!{isWin ? '胜利!' : '失败...'} {isWin && ( {playerPokemon.name} 获得了 {result.xpGained} 经验值! {Object.keys(result.evGained).length > 0 && ( 努力值获得: {Object.entries(result.evGained).map(([stat, value]) => ( {stat.toUpperCase()}+{value} ))} )} )} [Enter] 继续 ) }