"use strict";
/**
 * Copyright: (c) Myia SAS 2026.
 * This file and its contents are licensed under the AGPLv3 License.
 * Please see the LICENSE file at the root of this repository
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.ActiveEnterStack = void 0;
class ActiveEnterStack {
    constructor() {
        this.stack = [];
    }
    push(event) {
        this.stack.push(event);
    }
    pop() {
        return this.stack.pop();
    }
    peek() {
        return this.stack[this.stack.length - 1];
    }
    depth() {
        return this.stack.length;
    }
    parentSeq() {
        if (this.stack.length === 0)
            return null;
        return this.stack[this.stack.length - 1].seq;
    }
    clear() {
        this.stack.length = 0;
    }
}
exports.ActiveEnterStack = ActiveEnterStack;
