"use strict";

exports.__esModule = true;
exports.TableFloatingScrollBarInitializer = TableFloatingScrollBarInitializer;
var _react = require("react");
var _FloatingScrollBarContext = require("../FloatingScrollBar/FloatingScrollBarContext");
var _TableContext = require("../TableContext");
function TableFloatingScrollBarInitializer(props) {
  var _useContext;
  var {
    floatingScrollBarStateRef
  } = (0, _FloatingScrollBarContext.useFloatingScrollBarContext)();
  var scrollElement = (_useContext = (0, _react.useContext)(_TableContext.TableContext)) == null ? void 0 : _useContext.scrollElement;
  (0, _react.useEffect)(() => {
    var _floatingScrollBarSta;
    return (_floatingScrollBarSta = floatingScrollBarStateRef.current) == null ? void 0 : _floatingScrollBarSta.init();
  }, [floatingScrollBarStateRef, scrollElement]);
  return props.children;
}
//# sourceMappingURL=TableFloatingScrollBarInitializer.js.map