'use strict';

var linearEasing = require('../../../utils/supports/linear-easing.js');
var isGenerator = require('../../generators/utils/is-generator.js');

function applyGeneratorOptions({ type, ...options }) {
    if (isGenerator.isGenerator(type) && linearEasing.supportsLinearEasing()) {
        return type.applyToOptions(options);
    }
    else {
        options.duration ?? (options.duration = 300);
        options.ease ?? (options.ease = "easeOut");
    }
    return options;
}

exports.applyGeneratorOptions = applyGeneratorOptions;
