"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
const mobx_1 = require("mobx");
const Box_1 = require("./Box");
class IndentBox extends Box_1.Box {
    constructor(exp, role, indent, child) {
        super(exp, role);
        this.kind = "IndentBox";
        this.child = null;
        this.indent = 4;
        this.indent = indent;
        this.child = child;
        child.parent = this;
        this.selectable = false;
    }
    get firstLeaf() {
        return this.child.firstLeaf;
    }
    get lastLeaf() {
        return this.child.lastLeaf;
    }
    get firstEditableChild() {
        return this.child.firstEditableChild;
    }
    get children() {
        return [this.child];
    }
}
__decorate([
    mobx_1.observable,
    __metadata("design:type", Box_1.Box)
], IndentBox.prototype, "child", void 0);
__decorate([
    mobx_1.observable,
    __metadata("design:type", Number)
], IndentBox.prototype, "indent", void 0);
exports.IndentBox = IndentBox;
function isIndentBox(b) {
    return b instanceof IndentBox;
}
exports.isIndentBox = isIndentBox;
//# sourceMappingURL=IndentBox.js.map