import { useCollectionReachBottom } from './useCollectionReachBottom';
import React from 'react';
import { InfiniteScrollLoader } from './InfiniteScrollLoader/InfiniteScrollLoader';
import { observer } from 'mobx-react-lite';
import { useScrollableContentContext } from '../providers';
function _PageInfiniteScrollLoader(props) {
    const { scrollMoreAlways, ...rest } = props;
    const { scrollableContentRef } = useScrollableContentContext();
    const { targetRef } = useCollectionReachBottom({
        collection: props.state,
        containerRef: scrollableContentRef,
        scrollMoreAlways,
    });
    return React.createElement(InfiniteScrollLoader, { targetRef: targetRef, ...rest });
}
export const PageInfiniteScrollLoader = observer(_PageInfiniteScrollLoader);
//# sourceMappingURL=PageInfiniteScrollLoader.js.map