import { Behavior } from "../Behavior.js";
import { BehaviorStatus } from "../BehaviorStatus.js";

/**
 * Behavior that always succeeds.
 * Useful when you need to specify a behavior to fulfill the API, but you don't actually want to perform any action.
 * You usually want to use {@link INSTANCE} singleton
 * @author Alex Goldring
 * @copyright Company Named Limited (c) 2026
 */
export class SucceedingBehavior extends Behavior {

    initialize(context) {
        this.onInitialized.send2(this, context);
    }

    tick(timeDelta) {
        return BehaviorStatus.Succeeded;
    }

    /**
     * @readonly
     * @type {SucceedingBehavior}
     */
    static INSTANCE = Object.freeze(new SucceedingBehavior());

}

SucceedingBehavior.typeName = "SucceedingBehavior";

