'use client'; import type { Action, GameView } from '@/game/engine'; import { Button } from '@/components/ui/button'; export function BureaucratPayment({ game, act, busy, }: { game: GameView; act: (action: Action) => void; busy: boolean; }) { const pending = game.bureaucrat?.pending; const decision = game.decision; if ( !pending || decision?.kind !== 'bureaucratPayment' || decision.player !== game.me || decision.event !== pending.event || pending.owner !== game.me ) return null; const payer = game.players.find((player) => player.id === pending.payer)?.name ?? pending.payer; const payee = game.players.find((player) => player.id === pending.payee)?.name ?? pending.payee; return (

Bureaucrat payment

{pending.richeseAllocation ? <> The original Richese sale costs {pending.amount} spice. A qualifying portion goes to {payee}. You may redirect {pending.redirect} spice from that portion to the Bank.{' '} {pending.homeworldAllocation ? <>The remaining portion follows the original Homeworld income allocation. : <>{payee} receives {pending.redirect} less than their original portion.}{' '} Each contributor still pays their full original share. : <> {payer ? <>The payment from {payer} to {payee} : <>The qualifying allied-funded payment to {payee}}{' '} is {pending.amount} spice. You may redirect {pending.redirect} spice to the Bank.{' '} {pending.homeworldAllocation ? <>{pending.amount - pending.redirect} spice then follows the original Homeworld income allocation, including any occupied share. : <>{payee} receives {pending.amount - pending.redirect} spice and the Bank receives {pending.redirect}.}{' '} {payer ? `${payer} still pays the full amount` : 'Each contributor still pays their full original share'}. }

{pending.kind === 'bribe' && (

The recipient keeps this spice in front of their shield until the next Mentat Pause. It cannot be spent before then.

)} {pending.kind === 'revival' && (

This is the actual revival price. A separate free-revival award, if any, stays with Tleilaxu.

)}

Allowing the full payment preserves Bureaucrat for later use this phase.

); }