'use client'; import { parseBribeClaim, type BribeClaim } from '@/game/bribe-promises'; import { Input } from './ui/input'; type Recipient = { id: string; name: string }; export function bribeClaimInputError(value: unknown, recipients?: readonly Recipient[]): string | null { try { const claim = parseBribeClaim(value); return recipients && !recipients.some(recipient => recipient.id === claim.recipient) ? 'Choose one of the current bribe recipients.' : null; } catch (error) { return error instanceof Error ? error.message : 'Choose a recipient and a positive safe whole minimum.'; } } /** The parent supplies this turn and its current public recipient choices. */ export function BribeClaimFields(props: { value: BribeClaim; onChange: (claim: BribeClaim) => void; recipients: readonly Recipient[]; disabled?: boolean; }) { const error = bribeClaimInputError(props.value, props.recipients); const change = (value: unknown) => { if (!props.disabled && !bribeClaimInputError(value, props.recipients)) props.onChange(parseBribeClaim(value)); }; return
Future ordinary bribe payments

Turn {props.value.turn}

change({ ...props.value, minimum: event.currentTarget.valueAsNumber })} /> {error &&

{error}

}

Count cumulative future ordinary bribe payments to this recipient after the answer; smaller payments add together. Earlier payments, gifts and ally aid do not count. The sender pays now; the recipient collects the payment at the start of Mentat Pause. Payments made during Mentat Pause wait until the start of next turn's Mentat Pause.

; }