import { SequenceBehavior } from "../../../../intelligence/behavior/composite/SequenceBehavior.js";
import { AbstractActionDescription } from "./AbstractActionDescription.js";

export class ActionSequenceDescription extends AbstractActionDescription {


    /**
     *
     * @type {AbstractActionDescription[]}
     */
    elements = [];

    execute(actor, dataset, context, system) {
        const sequence = this.elements.map(e => {
            return e.execute(actor, dataset, context, system);
        });

        return SequenceBehavior.from(sequence);
    }
}
