'use strict';

var inertia = require('../generators/inertia.js');
var keyframes = require('../generators/keyframes.js');
var spring = require('../generators/spring.js');

const transitionTypeMap = {
    decay: inertia.inertia,
    inertia: inertia.inertia,
    tween: keyframes.keyframes,
    keyframes: keyframes.keyframes,
    spring: spring.spring,
};
function replaceTransitionType(transition) {
    if (typeof transition.type === "string") {
        transition.type = transitionTypeMap[transition.type];
    }
}

exports.replaceTransitionType = replaceTransitionType;
