'use client'; import type { Action, GameView } from '@/game/engine'; import { Button } from '@/components/ui/button'; import { CardInspector, CardRules } from './card-inspector'; export function AuditorDecision({ game, act, busy, }: { game: GameView; act: (action: Action) => void; busy: boolean; }) { const audit = game.auditor; if (!audit) return null; const payment = game.decision?.kind === 'choamAuditPayment'; const opponent = game.players.find((p) => p.id === audit.opponent); return (

{payment ? 'Keep your hand private' : 'Use the Auditor'}

{payment ? `Pay ${audit.count} spice to CHOAM to cancel the entire inspection, or allow it without payment.` : `Your Auditor ${audit.survived ? 'survived' : 'died'}. You may inspect ${audit.count} random card${audit.count === 1 ? '' : 's'} from ${opponent?.name ?? 'your opponent'}’s hand. Cards used in this battle are excluded.`}

{!payment && (

Karama can prevent the audit. Your opponent can also cancel by paying one spice per card you would inspect.

)}
); } export function AuditorInsight({ game }: { game: GameView }) { const insight = game.auditorInsight; if (!insight) return null; const opponent = game.players.find((p) => p.id === insight.target); return (

Your Auditor inspection · {opponent?.name}

Only you receive this inspection. These cards were in the opposing hand when the audit resolved; they may move afterward. The inspection stays here until the next battle or turn.

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

{card.name}

))}
); }