/// import React from 'react'; import { List, Set } from 'immutable'; declare type WrapListDefaults = Required, 'listActions' | 'isLoading' | 'isAdding' | 'resetStates' | 'shouldUpdate'>>; export declare type GrabListProps = { listId: string; filterData: F; filterValue: V; resetStates?: boolean; shouldUpdate?: (props: object, next: object) => boolean; listActions: { showByState(state: F, value: V, t?: number): void | Promise; showByStates(state: F, t?: number): void | Promise; showByResetStates(state: F, t?: number): void | Promise; }; }; declare type WrapListProps = { initialized: boolean; ids: List | Set | Array; isLoading: boolean; isAdding: boolean; } & GrabListProps; /** * Component Enhancer (HOC) for manage the results states * @param {Component} WrappedList * @return {WrapperComponent} WrapList */ export default function controlListState = WrapListProps>(WrappedList: React.ComponentType): { new (props: Readonly): { componentDidMount(): void; componentDidUpdate(prevProps: Readonly): void; shouldComponentUpdate(nextProps: Readonly): boolean; refreshResults(props: Readonly, timeout?: number): void; render(): React.ReactNode; context: any; setState(state: {} | ((prevState: Readonly<{}>, props: Readonly) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly & Readonly<{ children?: React.ReactNode; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly, prevState: Readonly<{}>): any; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly, nextContext: any): void; componentWillUpdate?(nextProps: Readonly, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly, nextState: Readonly<{}>, nextContext: any): void; }; new (props: TProps, context?: any): { componentDidMount(): void; componentDidUpdate(prevProps: Readonly): void; shouldComponentUpdate(nextProps: Readonly): boolean; refreshResults(props: Readonly, timeout?: number): void; render(): React.ReactNode; context: any; setState(state: {} | ((prevState: Readonly<{}>, props: Readonly) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callback?: (() => void) | undefined): void; readonly props: Readonly & Readonly<{ children?: React.ReactNode; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; componentWillUnmount?(): void; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly, prevState: Readonly<{}>): any; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly, nextContext: any): void; componentWillUpdate?(nextProps: Readonly, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly, nextState: Readonly<{}>, nextContext: any): void; }; displayName: string; defaultProps: WrapListDefaults; contextType?: React.Context | undefined; }; export {};