'use client'; import { parseBidClaim, type BidClaim } from '@/game/bid-promises'; import { Input } from './ui/input'; export function bidClaimInputError(value: unknown): string | null { try { parseBidClaim(value); return null; } catch (error) { return error instanceof Error ? error.message : 'Choose a positive whole bid minimum.'; } } /** The parent supplies the public current lot; only the minimum is editable. */ export function BidClaimFields(props: { value: BidClaim; onChange: (claim: BidClaim) => void; disabled?: boolean; }) { const error = bidClaimInputError(props.value); return
Current ordinary-lot bid

Turn {props.value.turn} ยท Ordinary lot {props.value.lot}

{ if (props.disabled) return; const next = { ...props.value, minimum: event.currentTarget.valueAsNumber }; if (bidClaimInputError(next)) return; props.onChange(parseBidClaim(next)); }} /> {error &&

{error}

}

This asks whether you will place at least one bid of this size from now until this lot closes. It does not promise a win. If you win, the original payment rules still apply. Ordinary bank auctions only; optional modules and native special auctions are excluded.

; }