import { useContext, useEffect } from 'react';
import { useFloatingScrollBarContext } from '../FloatingScrollBar/FloatingScrollBarContext';
import { TableContext } from '../TableContext';
export function TableFloatingScrollBarInitializer(props) {
    const { floatingScrollBarStateRef } = useFloatingScrollBarContext();
    const scrollElement = useContext(TableContext)?.scrollElement;
    useEffect(() => floatingScrollBarStateRef.current?.init(), [floatingScrollBarStateRef, scrollElement]);
    return props.children;
}
//# sourceMappingURL=TableFloatingScrollBarInitializer.js.map