import { Result } from "@sajari/sdk-js"; import { ControllerStateAndHelpers, DownshiftProps, DownshiftState, StateChangeOptions as BaseStateChangeOptions } from "downshift"; import * as React from "react"; import { PaginateFn, SearchFn } from "../context/pipeline/context"; export declare type SearchStateAndHelpers = ControllerStateAndHelpers & PipelineProps; export interface PipelineProps { search: SearchFn; instantSearch: SearchFn; paginate: PaginateFn; suggestions: string[]; results: Result[]; completion: string; summary: SummaryInterface | undefined; } export interface PipelineResponseInterface { [k: string]: string | number; } export interface SummaryInterface { queryValues: PipelineResponseInterface; values: PipelineResponseInterface; response: PipelineResponseInterface; } export interface StateChangeOptions extends BaseStateChangeOptions { } export interface SearchState extends DownshiftState { } declare type Omit = Pick>; export interface SearchProps extends Omit, "onChange" | "stateReducer" | "children"> { children: (args: SearchStateAndHelpers) => JSX.Element; defaultInputValue?: string; stateReducer?: (state: SearchState, changes: StateChangeOptions, pipeline: PipelineProps, defaultInputValue?: string) => Partial>; onChange?: (selectedItem: Item, stateAndHelper: SearchState & PipelineProps) => void; } export declare class Search extends React.PureComponent, {}> { static stateChangeTypes: { resetInput: string; unknown: import("downshift").StateChangeTypes.unknown; mouseUp: import("downshift").StateChangeTypes.mouseUp; itemMouseEnter: import("downshift").StateChangeTypes.itemMouseEnter; keyDownArrowUp: import("downshift").StateChangeTypes.keyDownArrowUp; keyDownArrowDown: import("downshift").StateChangeTypes.keyDownArrowDown; keyDownEscape: import("downshift").StateChangeTypes.keyDownEscape; keyDownEnter: import("downshift").StateChangeTypes.keyDownEnter; clickItem: import("downshift").StateChangeTypes.clickItem; blurInput: import("downshift").StateChangeTypes.blurInput; changeInput: import("downshift").StateChangeTypes.changeInput; keyDownSpaceButton: import("downshift").StateChangeTypes.keyDownSpaceButton; clickButton: import("downshift").StateChangeTypes.clickButton; blurButton: import("downshift").StateChangeTypes.blurButton; controlledPropUpdatedSelectedItem: import("downshift").StateChangeTypes.controlledPropUpdatedSelectedItem; touchStart: import("downshift").StateChangeTypes.touchStart; }; state: {}; render(): JSX.Element | null; private stateReducer; private onChange; } export default Search;