import { Component } from 'react'; import { APIConfig } from './types'; import { QueryParams } from '../util'; interface APIPlaceholderProps { isLoading: boolean; } type ChildFunction = (d: T) => React.ReactNode; type APIChild = React.ReactElement<{ data: T; isLoading: boolean; }> | ChildFunction; type APIViewProps = { children?: APIChild; placeholder: React.ComponentType; params: QueryParams; route: string | null; isLoading: boolean; data: T; totalCount?: number; pageCount?: number; }; interface APIResultProps extends APIViewProps { onSuccess: (d: T) => void; debounce: number; opts?: Partial; } type APIResultState = { data: T; isLoading: boolean; }; declare class APIResultView extends Component, APIResultState> { static contextType: import('react').Context<{ baseURL: string; axiosInstance: import('axios').AxiosInstance; } & { config: APIConfig; }>; static defaultProps: { route: null; params: {}; opts: {}; debug: boolean; onSuccess: () => void; primaryKey: string; placeholder: (props: APIPlaceholderProps) => import('react').DOMElement, Element>; debounce: number; children: (data: any) => import('react').FunctionComponentElement; }; _didFetch: boolean; _lazyGetData: () => Promise; constructor(props: any, context: any); buildURL(props?: null): string; componentDidUpdate(prevProps: any): Promise | undefined; getData(): Promise; renderInner(): import('react').ReactElement>; render(): import('react').ReactElement> | import('react').FunctionComponentElement<{ children?: React.ReactNode; } & { totalCount?: number; indexOffset?: number; }>; } export { APIResultView, APIResultProps, APIPlaceholderProps };