import { jsx as _jsx } from "react/jsx-runtime";
import React from 'react';
import { useIntersection } from '@gravity-ui/uikit';
import { block } from "../../../utils/cn.js";
import "./IntersectionContainer.css";
const b = block('intersection-container');
export const IntersectionContainer = ({ children, onIntersect, options, className, }) => {
    const [ref, setRef] = React.useState(null);
    useIntersection({ element: ref, onIntersect, options });
    if (onIntersect) {
        return (_jsx("div", { className: b('container', className), ref: setRef, children: children }));
    }
    return children;
};
//# sourceMappingURL=IntersectionContainer.js.map
