"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: Object.getOwnPropertyDescriptor(all, name).get
    });
}
_export(exports, {
    get getOffsets () {
        return getOffsets;
    },
    get getSliderThumbValue () {
        return getSliderThumbValue;
    }
});
function getSliderThumbValue(handleCenterXRelative, stepSize, min, max) {
    var newValue = Math.round(handleCenterXRelative / stepSize) + min;
    return Math.min(Math.max(newValue, min), max);
}
function getOffsets(ref, side) {
    if (!ref || !('current' in ref) || !ref.current || !side) {
        return [
            0,
            0
        ];
    }
    var size = ref.current.clientWidth;
    if (side === 'left') {
        return [
            0,
            size
        ];
    }
    if (side === 'right') {
        return [
            size,
            0
        ];
    }
    return [
        0,
        0
    ];
}
