import { ReactChild } from 'react'; import { PiralPlugin } from 'piral-core'; import { PiletSearchApi, SearchSettings, SearchHandler, SearchActionsConfig } from './types'; export interface InitialSearchProvider { /** * Defines the search handler. */ search: SearchHandler; /** * The optional settings to be defined. */ settings?: SearchSettings; } /** * Available configuration options for the search plugin. */ export interface SearchConfig extends SearchActionsConfig { /** * Sets the providers to be given by the app shell. * @default [] */ providers?: Array; /** * Sets the initial results of the search. * @default [] */ results?: Array; /** * Sets the initial query. * @default '' */ query?: string; /** * Determines if the providers are also used for an empty query. * @default false */ emptyTrigger?: boolean; /** * Allows filtering of the search providers to query. * @param query The query that should be run. * @param providerNames The names of the available search providers. * @default undefined */ filter?(query: string, providerNames: Array): Array; } /** * Creates new Pilet API extensions for search and filtering. */ export declare function createSearchApi(config?: SearchConfig): PiralPlugin;