import AbstractArena from './AbstractArena';
export default class AbstractAncestorArena extends AbstractArena {
    constructor(options) {
        super(options);
        this.root = false;
        this.hasParent = true;
        this.hasChildren = true;
        this.hasText = false;
        this.inline = false;
        this.single = false;
        this.automerge = false;
        this.group = false;
        this.protected = false;
        this.protectedChildren = [];
        this.allowedArenas = [];
        if ('protectedChildren' in options) {
            this.protected = true;
            this.protectedChildren = options.protectedChildren;
            this.allowedArenas = options.protectedChildren.map((item) => (Array.isArray(item) ? item[0] : item));
        }
        else {
            this.allowedArenas = options.allowedArenas || [];
            if (options.automerge) {
                this.automerge = options.automerge;
            }
            if (options.group) {
                this.group = options.group;
            }
        }
        this.arenaForText = options.arenaForText;
    }
    addAllowedChild(arena) {
        this.allowedArenas.push(arena);
    }
    setArenaForText(arena) {
        this.arenaForText = arena;
    }
    getArenaForText() {
        return this.arenaForText;
    }
}
//# sourceMappingURL=AbstractAncestorArena.js.map