import { AuctionBidInput, AuctionConsumerStatus } from '@fanfare-io/fanfare-sdk-core/auctions'; import { ClaimableSettlement, PreAuthSettlement } from '@fanfare-io/fanfare-sdk-core/experiences'; import { AuctionDisplayState } from '@fanfare-io/fanfare-sdk-core/internals'; import { GrantedSelection, SelectionChoice, SelectionDraft, SelectionOptions } from '@fanfare-io/fanfare-sdk-core/selections'; import { ReadableAtom } from 'nanostores'; import { SelectionCheckoutDetails } from '../../lib/selection-display'; import { OutcomeAction } from '../compositions/outcome-panel'; import { OutcomeReason } from '../module'; export interface AuctionModuleProps { display$?: ReadableAtom; sequencePhase: "enterable" | "participating" | "settling" | "granted" | "ended"; /** Place a bid. English sends `{ amount }`; Dutch clinches at the shown price and sends `{}`. */ onBid?: (input: AuctionBidInput) => Promise; /** This consumer's own bid, which the live display state does not carry. */ yourBid?: string; /** This consumer's own standing, which the live display state carries only as a loose string. */ yourStatus?: AuctionConsumerStatus; countdownTo?: Date; /** Currency code for money display; the live display state's own code wins when present. */ currencyCode?: string; /** Locale for currency formatting */ locale?: string; grant?: string; expiresAt?: number | Date; /** The amount this win settles at, shown beside the payment countdown. */ wonAmount?: string; /** * Which mechanism settled. The granted frame has no display atom to read the pricing model * from, and a Dutch consumer bought at a posted price rather than winning a contest. */ auctionType?: "english" | "dutch"; checkoutUrl?: string; /** * Activating the checkout CTA. Receives the pick the grant settled on, with the catalogue * objects behind it, whenever the panel has loaded the catalogue that carries them. */ onCheckoutClick?: (details?: SelectionCheckoutDetails) => void | Promise; /** Set when `onCheckoutClick` consumes the details, so the CTA waits for a catalogue still loading. */ awaitCheckoutDetails?: boolean; /** Granted-state selection arm; drives the panel's pick, reveal and summary states. */ grantedSelection?: GrantedSelection; /** How the win settles; selects the granted confirm label and payment affordance. */ settlement?: ClaimableSettlement | PreAuthSettlement; /** The auction captures a product choice on the entering bid, so the bid surface renders a picker. */ selectionRequired?: boolean; /** Bound by the widget against the journey; must be referentially stable. */ loadSelectionOptions?: () => Promise; /** The pair the standing bid was placed for; present, it is read back instead of offered again. */ lockedSelection?: SelectionChoice | null; /** Submits the granted pick or re-pick. */ onSelect?: (choice: SelectionChoice) => Promise; /** Every local pick-surface transition, product-only drafts included; feeds the page-bridge event. */ onDraftChange?: (draft: SelectionDraft) => void; /** Locked copy for a resolved granted summary; "checkout" once checkout has started. */ selectionLockedReason?: "checkout" | "final"; /** Already-translated selection failure from the widget, rendered beside the acting control. */ selectError?: string | null; outcomeReason?: OutcomeReason; /** Host-provided action shown on the terminal panel. */ outcomeAction?: OutcomeAction; onReenter?: () => Promise; isReentering?: boolean; class?: string; className?: string; } export declare function AuctionModule(props: AuctionModuleProps): import("solid-js").JSX.Element; export declare namespace AuctionModule { var displayName: string; }