'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var getBoundingClientRect = require('./getBoundingClientRect.js');
var getDocumentElement = require('./getDocumentElement.js');
var getWindowScroll = require('./getWindowScroll.js');

function getWindowScrollBarX(element) {
  // If <html> has a CSS width greater than the viewport, then this will be
  // incorrect for RTL.
  // Popper 1 is broken in this case and never had a bug report so let's assume
  // it's not an issue. I don't think anyone ever specifies width on <html>
  // anyway.
  // Browsers where the left scrollbar doesn't cause an issue report `0` for
  // this (e.g. Edge 2019, IE11, Safari)
  return getBoundingClientRect.default(getDocumentElement.default(element)).left + getWindowScroll.default(element).scrollLeft;
}

exports.default = getWindowScrollBarX;
//# sourceMappingURL=getWindowScrollBarX.js.map
