import { ReactElement } from "react" export type QuickSearchSection = { /* used to uniquely identify this section */ id: string /* the label of this section */ sectionLabel: string | ReactElement /* configuration for retrieving / interacting with results */ resolveResults: QuickSearchResultsResolver maxResults?: number // overrides the behavior just for this section /* configuration for the show more button */ showMoreLabel: string | ReactElement } export type QuickSearchResultsResolver = (searchQuery: string) => Promise export type QuickSearchResult = { id: string label: string } export type QuickSearchLink = { id: string label: string | ReactElement onSelect: (link: QuickSearchLink, searchQuery: string) => void }