'use client'; import type { Action, GameView } from '@/game/engine'; import { Button } from './ui/button'; export function NexusEmperorSellerPurchase({ game, act, busy }: { game: GameView; act: (action: Action) => void; busy: boolean; }) { const decision = game.decision; if (decision?.kind !== 'nexusEmperorSellerPurchase' || decision.player !== game.me) return null; const own = game.players.find(player => player.id === game.me); const offer = game.nexusEmperorSellerPurchase; const seller = offer && game.players.find(player => player.id === offer.seller); const disabled = busy || game.status !== 'playing' || game.phase !== 3 || game.automaticContinuationPending || !!game.phaseOpening || !!game.response || !!game.truthtrance || !!game.nexusTraitors?.pending || !!game.roomControl?.paused || !!game.roomControl?.closed || !!own?.autopilot; const entitled = !!offer && offer.event === decision.event && offer.canUse && !offer.blocked; return (

Confirm your winning purchase

Pay the original winning price to complete this Treachery Card purchase. This confirmation does not change the winning lot or bid.

{offer && <>

Emperor Nexus · Secret Ally

The original {offer.source === 'cache' ? 'Richese cache' : 'Black Market'} price is {' '}{offer.price} spice. Show that you personally hold the full amount to keep your spice while acquiring the original card.

Provisional seller policy, not a publisher ruling: {' '}{seller?.name ?? offer.seller} remains unpaid. No bank reimbursement or substitute payer is created. {offer.policy} Using this option spends your Emperor Nexus Card.

{offer.blocked && {offer.blocked}} } {offer && entitled && }
); }