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