import React from 'react' import { Box, Text } from '@anthropic/ink' import type { Creature } from '../types' import { getCreatureName } from '../core/creature' const CYAN = 'ansi:cyan' const GRAY = 'ansi:white' const WHITE = 'ansi:whiteBright' interface SwitchPanelProps { party: Creature[] activeId: string onSelect: (creatureId: string) => void onCancel: () => void } export function SwitchPanel({ party, activeId, onSelect, onCancel }: SwitchPanelProps) { return ( 换人 {party.map((creature, i) => { const isActive = creature.id === activeId return ( {isActive ? ' ▶ ' : ' '} [{i + 1}] {getCreatureName(creature)} (Lv.{creature.level}){' '} {isActive && 当前场上} ) })} [ESC] 取消 ) }