export function calculateScrollProgress(ref, callback) {
    if (ref.current === null) {
        callback(0.0);
        return;
    }
    var _a = ref.current, scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;
    var maxScrollLeft = scrollWidth - clientWidth;
    if (maxScrollLeft <= 0) {
        callback(1.0);
    }
    else {
        callback(scrollLeft / maxScrollLeft);
    }
}
//# sourceMappingURL=scrollProgress.js.map