import { SelectionAvailability, SelectionChoice, SelectionDraft, SelectionOptions } from '@fanfare-io/fanfare-sdk-core/selections'; import { JSX } from 'solid-js'; import { ProductSelectorHandle } from './product-selector'; export interface EntrySelectionSurfaceProps { /** Fetch-on-open; must be referentially stable — a new identity re-fetches the catalogue. */ loadOptions(): Promise; /** Already-translated heading above the picker. */ title: JSX.Element; /** The consumer's current complete pair, or null while the pick is incomplete. */ onDraftSelection(choice: SelectionChoice | null): void; onOptionsLoaded(options: SelectionOptions): void; /** Every local transition, product-only drafts included; feeds the page-bridge event. */ onDraftChange?(draft: SelectionDraft): void; /** Set by the CTA when it was clicked on an incomplete pick. */ missingChoice: boolean; selectError?: string | null; disabled?: boolean; /** Receives the picker's imperative handle, so the CTA can move focus into an incomplete pick. */ ref?: (handle: ProductSelectorHandle) => void; } /** * The entry picker: statically present in the branch, with no open or collapse of its own. * * The CTA below it stays enabled with no choice made, so the consumer finds out what is missing * by acting rather than by a control that refuses to be pressed. */ export declare function EntrySelectionSurface(props: EntrySelectionSurfaceProps): JSX.Element; export declare namespace EntrySelectionSurface { var displayName: string; } export interface RecordedSelectionSurfaceProps { choice: SelectionChoice; availability?: SelectionAvailability; loadOptions?: () => Promise; /** Submits the new pair; rejects when the server refuses, which keeps the picker open. */ onSelectionChange?: (choice: SelectionChoice) => Promise; /** Options already in memory from a pick made earlier in this mount. */ loadedOptions: SelectionOptions | null; onOptionsLoaded(options: SelectionOptions): void; /** Every local transition, product-only drafts included; feeds the page-bridge event. */ onDraftChange?(draft: SelectionDraft): void; selectError?: string | null; } /** * The recorded pick and its re-pick, for a consumer already waiting on a result. * * A fresh mount has no catalogue in memory and makes no request for one: the summary states the * pick generically rather than spending an entrant's request budget on prettier names. */ export declare function RecordedSelectionSurface(props: RecordedSelectionSurfaceProps): JSX.Element; export declare namespace RecordedSelectionSurface { var displayName: string; }