import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
import { useRef } from "react";
import { useEndReached } from "./useEndReached";
export const EndReachedBox = (props)=>{
    const sentinelRef = useRef(null);
    const { onEndReached } = props;
    useEndReached(sentinelRef, ()=>{
        onEndReached?.();
    });
    return /*#__PURE__*/ _jsxs(_Fragment, {
        children: [
            props.children,
            /*#__PURE__*/ _jsx("div", {
                ref: sentinelRef,
                className: props.className || "orderly-relative orderly-invisible orderly-h-[1px] orderly-top-[-300px]"
            })
        ]
    });
};

//# sourceMappingURL=endReachedBox.js.map