'use client'; import { useId } from 'react'; import type { Action, GameView } from '@/game/engine'; import { Button } from './ui/button'; import { CardInspector, CardRules } from './card-inspector'; type BoxProps = { game: GameView; act: (action: Action) => void; busy: boolean; }; /** Before payment this renders only the owned Box, never discard candidates. */ export function NullentropyBox({ game, act, busy }: BoxProps) { const id = useId(); const box = game.nullentropy; if (!box) return null; if (box.search) return (

Your Nullentropy Box search is paid. Complete the private card choice in the decision panel above.

); return (
Nullentropy Box: paid discard search

Pay 2 spice to the bank to privately search the Treachery discard pile. Choose one card other than any Nullentropy Box. The remaining pile is shuffled, then your played Box is discarded on top.

Payment begins the search. There is no free cancellation after seeing the cards. If only one card is eligible, the server takes it automatically.

{box.blocked && (

{box.blocked}

)}
); } /** Only the paid, entitled projection supplies these temporary discard faces. */ export function NullentropySearch({ game, act, busy }: BoxProps) { const search = game.nullentropy?.search; if ( game.decision?.kind !== 'nullentropy' || game.decision.player !== game.me || !search ) return null; return (

You have paid 2 spice. Choose one card for your hand. This finishes the search and discards your Box on top of the shuffled remainder.

These discard cards are visible only to you during this paid search. Inspection does not select a card.

{search.cards.map((card) => (

{card.name}

))}
); }