"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BasicTreeNode = exports.BasicCompositeTreeNode = exports.BasicTreeRoot = void 0;
const tree_1 = require("../tree");
class BasicTreeRoot extends tree_1.CompositeTreeNode {
    constructor(tree, parent, data, basicTreeRootOptions = {}) {
        super(tree, parent, undefined, {
            treeName: basicTreeRootOptions.treeName,
        });
        this._raw = data;
    }
    get name() {
        var _a;
        return (_a = this.getMetadata('treeName')) !== null && _a !== void 0 ? _a : `BasicTreeRoot_${this.id}`;
    }
    get raw() {
        return this._raw;
    }
    get expanded() {
        return true;
    }
}
exports.BasicTreeRoot = BasicTreeRoot;
class BasicCompositeTreeNode extends tree_1.CompositeTreeNode {
    constructor(tree, parent, data, id) {
        super(tree, parent, undefined, {
            name: data.label,
        });
        this.isExpanded = data.expanded || false;
        this.id = id || this.id;
        this._displayName = data.label;
        this._raw = data;
    }
    get displayName() {
        return this._displayName;
    }
    get renderLabel() {
        return this.raw.renderLabel;
    }
    get icon() {
        return this.raw.icon;
    }
    get iconClassName() {
        return this.raw.iconClassName;
    }
    get className() {
        return this.raw.className;
    }
    get twisterClassName() {
        return this.raw.twisterClassName;
    }
    get twisterPlaceholderClassName() {
        return this.raw.twisterPlaceholderClassName;
    }
    get indentOffset() {
        return this.raw.indentOffset;
    }
    get description() {
        return this.raw.description;
    }
    get raw() {
        return this._raw;
    }
    get expandable() {
        return !!this._raw.expandable;
    }
}
exports.BasicCompositeTreeNode = BasicCompositeTreeNode;
class BasicTreeNode extends tree_1.TreeNode {
    constructor(tree, parent, data, id) {
        super(tree, parent, undefined, {
            name: data.label,
        });
        this.id = id || this.id;
        this._displayName = data.label;
        this._raw = data;
    }
    get displayName() {
        return this._displayName;
    }
    get renderLabel() {
        return this.raw.renderLabel;
    }
    get description() {
        return this.raw.description;
    }
    get icon() {
        return this.raw.icon;
    }
    get iconClassName() {
        return this.raw.iconClassName;
    }
    get className() {
        return this.raw.className;
    }
    get twisterClassName() {
        return this.raw.twisterClassName;
    }
    get indentOffset() {
        return this.raw.indentOffset;
    }
    get twisterPlaceholderClassName() {
        return this.raw.twisterPlaceholderClassName;
    }
    get raw() {
        return this._raw;
    }
}
exports.BasicTreeNode = BasicTreeNode;
//# sourceMappingURL=tree-node.define.js.map