/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes} checked by tsc
 */
var /** @type {?} */ scrollbarWidth;
// Measure scrollbar width for padding body during modal show/hide
var /** @type {?} */ scrollbarMeasure = {
    position: 'absolute',
    top: '-9999px',
    width: '50px',
    height: '50px',
    overflow: 'scroll'
};
/**
 * @return {?}
 */
export function measureScrollbar() {
    if (typeof document === 'undefined' || typeof window === 'undefined') {
        return 0;
    }
    if (scrollbarWidth) {
        return scrollbarWidth;
    }
    var /** @type {?} */ scrollDiv = document.createElement('div');
    for (var /** @type {?} */ scrollProp in scrollbarMeasure) {
        if (scrollbarMeasure.hasOwnProperty(scrollProp)) {
            scrollDiv.style[scrollProp] = scrollbarMeasure[scrollProp];
        }
    }
    document.body.appendChild(scrollDiv);
    var /** @type {?} */ width = scrollDiv.offsetWidth - scrollDiv.clientWidth;
    document.body.removeChild(scrollDiv);
    scrollbarWidth = width;
    return scrollbarWidth;
}
//# sourceMappingURL=mesure-scrollbar.js.map