import { SelectionChoice, SelectionDraft, SelectionOptions } from '@fanfare-io/fanfare-sdk-core/selections'; export interface ProductSelectorHandle { /** Moves focus to the first interactive element. */ focus(): void; /** Re-fetches options; the host triggers this after a sold-out failure. */ refresh(): void; } export interface ProductSelectorProps { /** * Fetch-on-open; the caller binds the view's option loader. Must be referentially * stable — a new identity is a new loader and re-fetches the catalogue. */ loadOptions(): Promise; /** * Restrict rendering to one assigned product's subtree. Sourced from the journey's * selection arm — the options payload carries no assignment of its own. */ assignedProductId?: string; /** Pre-select a previously recorded or pinned choice. */ initialChoice?: SelectionChoice | null; /** * Bubbled so the parent drives the confirm, enter or bid action — the selector never * submits a selection itself. A complete choice sends the pair; anything less sends null. */ onSelectionChange(choice: SelectionChoice | null): void; /** * Fires on every local transition with the exact draft. Product-only picks are * representable here and not through `onSelectionChange`, and this never drives a CTA. */ onDraftChange?(draft: SelectionDraft): void; /** Fires after each successful fetch, so hosts derive display strings without a second request. */ onOptionsLoaded?(options: SelectionOptions): void; /** Already-translated error from the parent's action, rendered inline beneath the grid. */ selectError?: string | null; disabled?: boolean; /** Receives the imperative handle once, at mount. */ ref?: (handle: ProductSelectorHandle) => void; class?: string; className?: string; } /** * The picker: product rows, the selected product's option chips, and the resolved price. * * Resolution and selectability are the core module's, never re-derived here, so the * adapter and the server agree on what a choice means. The component owns no action: * it reports a complete pair upward and the host decides what to do with it. */ export declare function ProductSelector(props: ProductSelectorProps): import("solid-js").JSX.Element; export declare namespace ProductSelector { var displayName: string; }