const preact = require('preact');

const Attack = require('./anims/attack');

function animations(props) {
    const { combatTextClass, combatText, stage, player, construct } = props;

    if (combatText === 'Attack') {
        return (
            <div class={combatTextClass}>
                <Attack id={construct.id} stage={stage} team={player}/>
            </div>
        );
    }
    if (combatText) return <div construct={construct} class={combatTextClass}>{combatText}</div>;
    return (<div>&nbsp;</div>);
}

module.exports = animations;
