import React, { PureComponent } from 'react'; import type { StyleProp, TextStyle, ViewStyle } from 'react-native'; import type { SearchBarProps } from './SearchBar'; export interface HighlightResult { str: string; isHighlight: boolean; } export interface HighlightResultAccumulator { result: HighlightResult[]; } export interface SearchScreenResult { title: string; [key: string]: unknown; } export interface SerializableSearchScreenProps { style?: ViewStyle; itemStyle?: ViewStyle; itemTextStyle?: TextStyle; searchResultsScrollViewStyle?: ViewStyle; searchBarContainerStyle?: ViewStyle; /** * Whether or not the search bar should automatically focus when the component mounts. * Defaults to true. */ searchBarShouldFocus?: boolean; clearButtonText?: string; clearButtonStyle?: TextStyle; clearButtonWrap?: ViewStyle; recentTitle?: string; recentTitleStyle?: TextStyle; recentTitleWrap?: ViewStyle; } export interface SearchScreenProps extends Omit { onClose: () => void; onResultPress?: (result: SearchScreenResult) => void; onInputChange?: (value: string) => void; onInputSubmit?: (value: string) => void; renderResultItem?: (result: SearchScreenResult, index: number, inputValue: string) => React.ReactNode; renderResultsHeader?: () => React.ReactNode; renderNoResults?: () => React.ReactNode; searchBarProps?: SearchBarProps; results?: SearchScreenResult[]; style?: StyleProp; itemStyle?: StyleProp; itemTextStyle?: StyleProp; renderContentUnderSearchBar?: () => React.ReactNode; searchResultsScrollViewStyle?: StyleProp; searchBarContainerStyle?: StyleProp; clearButtonStyle?: StyleProp; clearButtonWrap?: StyleProp; recentTitleStyle?: StyleProp; recentTitleWrap?: StyleProp; } export interface SearchScreenState { history: SearchScreenResult[]; inputValue: string; } export declare class SearchScreen extends PureComponent { constructor(props: SearchScreenProps); private searchBar; private readonly loadHistoryToState; private readonly getSearchBarRef; private readonly getHistory; private readonly addToHistory; private readonly handleResultPress; private readonly handleSubmit; private readonly clearHistory; private readonly renderHistory; private readonly renderResult; private readonly renderItem; private readonly renderTextWithHighLights; private readonly handleChange; private readonly renderSearchBar; private readonly renderContentUnderSearchBar; componentDidMount(): void; render(): JSX.Element; }