import { ReactNode, ComponentType } from 'react';
import '../styles/components/data-loader.scss';
export type WrapperProps<D> = {
    /**
     * Callback to request more items if user scrolled to the bottom of the scroll-container or if
     * the scroll-container isn't scrollable yet because not enough items have been loaded yet. If
     * not provided this component will simply pass the data prop to the BaseComponent to be rendered
     * without observing scroll or triggering more data loading.
     */
    onLoadMoreItems: () => void;
    /**
     * A boolean to indicate that the parent has more items to provide.
     */
    hasMoreData: boolean;
    /**
     * A custom loader component
     */
    loaderComponent?: ReactNode;
    /**
     * Data that is being represented in the wrapped component
     */
    data: D[];
    /**
     * Use a button to load more data instead of having infinite scrolling.
     * If this prop is a string or a node, it will render this within the button
     */
    clickToLoad?: boolean | ReactNode;
};
type BaseComponentProps<D> = {
    data: D[];
};
declare function withDataLoader<D extends Record<string, any>, P extends BaseComponentProps<D>>(BaseComponent: ComponentType<P>): import("react").FunctionComponent<P & WrapperProps<P["data"][0]>>;
export default withDataLoader;
