import { assert } from "../../../../core/assert.js";
import { Behavior } from "../Behavior.js";

/**
 *
 * @author Alex Goldring
 * @copyright Company Named Limited (c) 2026
 */
export class EntityBehavior extends Behavior {


    /**
     * Entity ID
     * @type {number}
     */
    entity = -1;

    /**
     *
     * @type {EntityComponentDataset}
     */
    ecd = null;

    initialize(context) {
        const {entity, ecd, engine} = context;

        assert.isNumber(entity, 'entity');
        assert.defined(ecd);
        assert.defined(engine);

        assert.ok(engine.isEngine, 'engine.isEngine !== true');

        super.initialize(context);

        this.entity = entity;
        this.ecd = ecd;
    }
}
