import { SelectionOptions } from '@fanfare-io/fanfare-sdk-core/selections'; import { Accessor } from 'solid-js'; export interface UseSelectionOptionsResult { options: Accessor; isLoading: Accessor; error: Accessor; /** Re-fetch; used by the sold-out auto-refetch and the handle's refresh(). */ refresh(): Promise; } /** * Fetches a selection catalogue on demand, once per loader identity. * * Nothing is cached across mounts, persisted, or deduped between callers: a * catalogue carries live availability, so a second consumer of a stale copy would * be shown a pick that is already gone. The primitive never polls. * * A refetch keeps the previously loaded catalogue in `options` so the caller can * hold its rendered grid rather than flashing back to a skeleton, and a standing * `error` survives until the retry settles so the failure view does not flash the * stale grid on its way back. Resolutions and rejections from a superseded * request, or from one still in flight after disposal, are dropped. */ export declare function useSelectionOptions(load: Accessor<(() => Promise) | undefined>): UseSelectionOptionsResult;