import { FiltersMap, OptionalFiltersMap } from '@wix/bex-core'; import { PickerStandaloneEvents, PickerStandaloneState } from '../../state'; import { CollectionConfigWithConditionals } from '@wix/bex-core/react'; export type LogoType = 'wix' | 'editorx'; export type PickerStandaloneConfigBase = { /** * URL to navigate to when there are no items available in the collection. */ noItemsAvailableDestinationUrl?: string; /** * A predicate for an item to be selected in the picker. * Pass `true` to select the first item. */ initialSelect?: true | ((item: T, index: number) => boolean); /** * A destination URL or callback to redirect to when the user selects an item. * Will be used when no query param override was provided. */ defaultDestinationUrl: string | ((item: T) => string); /** * Map of query params to object properties to allow for URL filtering. * For example - `urlSegmentPropertyMap: { msid: ['metaSiteId'] }` * will add support for `?msid=123` query params to filter `metaSiteId`. */ urlSegmentPropertyMap?: Record; /** * Optional callbacks for various events of the picker & collection state lifecycle:
* - `onSingleItemAutoNavigation` - when the picker is opened and auto-selects the only item in the collection
* - `onContinueToDestinationUrl` - when the user selects an item and submits
* - `onReady` - fires when the picker is ready to be interacted with
* - `onInitialPageFetched` - when the first page of items is ready
* - `onSearch` - when fetching new items as a result new search
* - `onSearchResults` - when the result of a search is ready
* - `onNewPageStart` - when starting to load the next page of items
* - `onNewPageAdded` - when the result of the next page is ready */ events?: PickerStandaloneEvents; /** * The type of logo to display in the picker. */ logoType?: LogoType; shouldFilterNotAffectTotalCount?: (filterName: keyof F) => boolean; }; export type PickerStandaloneConfig = CollectionConfigWithConditionals & PickerStandaloneConfigBase; export type PickerStandaloneFactory = (config: PickerStandaloneConfig) => PickerStandaloneState; export declare function useCreatePickerStandalone(): PickerStandaloneFactory; export declare function usePickerStandalone(config: PickerStandaloneConfig): PickerStandaloneState; //# sourceMappingURL=usePickerStandalone.d.ts.map