"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 momentum () {
        return momentum;
    },
    get useStyles () {
        return useStyles;
    }
});
var momentum = function momentum(distance, duration) {
    var speed = Math.abs(distance / duration);
    return speed / 0.003 * (distance < 0 ? -1 : 1);
};
var useStyles = function useStyles(touchTime, touchDeg, scrollDistance, lineSpacing, rotation) {
    var getTransitionStyle = function getTransitionStyle(transformValue) {
        return {
            transition: "transform ".concat(touchTime, "ms cubic-bezier(0.17, 0.89, 0.45, 1)"),
            transform: transformValue
        };
    };
    var touchRollerStyle = function touchRollerStyle() {
        return getTransitionStyle("rotate3d(1, 0, 0, ".concat(touchDeg, ")"));
    };
    var touchTiledStyle = function touchTiledStyle() {
        return getTransitionStyle("translate3d(0, ".concat(scrollDistance, "px, 0)"));
    };
    var rollerStyle = function rollerStyle(index) {
        return {
            transform: "rotate3d(1, 0, 0, ".concat(-rotation * (index + 1), "deg) translate3d(0px, 0px, ").concat(Math.round(lineSpacing.current * 3.2), "px)")
        };
    };
    return {
        touchRollerStyle: touchRollerStyle,
        touchTiledStyle: touchTiledStyle,
        rollerStyle: rollerStyle
    };
};
