const anime = require('animejs').default;

const { TIMES } = require('../../constants');

function Banish(id) {
    return anime({
        targets: [document.getElementById(id)],
        scaleY: 0,
        fill: '#fff',
        easing: 'easeOutElastic',
        delay: TIMES.TARGET_DELAY_MS,
        duration: TIMES.TARGET_DURATION_MS * 0.45,
        direction: 'alternate',
    });
}

module.exports = Banish;
