import NumericStepper from '../ui/NumericStepper'; import type { Ship } from '../../types/ship'; interface Props { ship: Ship; onUpdate: (patch: Partial) => void; editing: boolean; } export default function VitalsSection({ ship, onUpdate, editing }: Props) { return (

Vitals

{editing ? (
onUpdate({ hull_current: v })} /> onUpdate({ hull_max: v })} /> onUpdate({ armor_current: v })} /> onUpdate({ armor_max: v })} /> onUpdate({ ac: v })} /> onUpdate({ con_save: v })} />
) : (
Hull {ship.hull_current}/{ship.hull_max}
AC {ship.ac}
Armor {ship.armor_current}/{ship.armor_max}
Con {ship.con_save != null ? `+${ship.con_save}` : '—'}
)}
); }