'use client'; import { useState } from 'react'; import type { Action, GameView } from '@/game/engine'; import { nexusChoamTradeAction } from '@/game/nexus-choam-trade-options'; import { CardInspector } from './card-inspector'; import { Button } from './ui/button'; type Props = { game: GameView; act: (action: Action) => void; busy: boolean }; export function NexusChoamTrade({ game, act, busy }: Props) { const [selected, select] = useState(''); const offer = game.nexusChoamTrade; if (!offer) return null; const card = offer.cards.find(choice => choice.id === selected) ?? offer.cards[0]; const action = card ? nexusChoamTradeAction(game, card.id) : null; return (

CHOAM Nexus · Secret Ally

During Spice Collection, discard one Worthless card to receive two spice from the bank. This also spends your CHOAM Nexus card.

{offer.cards.length > 1 && ( )} {card &&
{card.name}
} {offer.blocked &&

{offer.blocked}

}

Optional: keep both cards by continuing the phase. This Nexus card’s battle inspection alternative is still in development.

); }