'use client'; import { useState } from 'react'; import type { Action, GameView } from '@/game/engine'; import { territory } from '@/game/board'; import { moritaniBetrayalAction } from '@/game/nexus-moritani-betrayal-options'; import { Button } from './ui/button'; type Props = { game: GameView; act: (action: Action) => void; busy: boolean }; export function NexusMoritaniBetrayal({ game, act, busy }: Props) { const [selected, select] = useState(''); const offer = game.nexusMoritaniBetrayal; if (!offer) return null; const token = offer.tokens.find(choice => choice.id === selected) ?? offer.tokens[0]; const action = token ? moritaniBetrayalAction(game, token.id) : null; return (

Moritani Nexus · Betrayal

Return one placed Terror token to Moritani’s hidden supply without revealing its face. Spend this Nexus card.

{offer.tokens.length > 1 && } {token &&

Selected: {territory(token.territory).name}

} {offer.blocked &&

{offer.blocked}

}
); }