var FormField = /** @class */ (function () {
    function FormField(form, translationService) {
        this.form = form;
        this.translationService = translationService;
    }
    FormField.prototype.getForm = function () {
        return this.form;
    };
    Object.defineProperty(FormField.prototype, "height", {
        get: function () {
            return this._height;
        },
        set: function (value) {
            this._height = value;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FormField.prototype, "visible", {
        get: function () {
            return this._visible;
        },
        set: function (value) {
            this._visible = value;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FormField.prototype, "width", {
        get: function () {
            return this._width;
        },
        set: function (value) {
            this._width = value;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FormField.prototype, "newRow", {
        get: function () {
            return this._newRow;
        },
        set: function (value) {
            this._newRow = value;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FormField.prototype, "required", {
        get: function () {
            return this._required;
        },
        set: function (value) {
            this._required = value;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FormField.prototype, "readonly", {
        get: function () {
            return this._readonly;
        },
        set: function (value) {
            this._readonly = value;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FormField.prototype, "id", {
        get: function () {
            return this._id;
        },
        set: function (value) {
            this._id = value;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FormField.prototype, "name", {
        get: function () {
            return this._name;
        },
        set: function (value) {
            this._name = value;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FormField.prototype, "type", {
        get: function () {
            return this._type;
        },
        set: function (value) {
            this._type = value;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FormField.prototype, "labelVisible", {
        get: function () {
            return this._labelVisible;
        },
        set: function (value) {
            this._labelVisible = value;
        },
        enumerable: false,
        configurable: true
    });
    FormField.prototype.isReadonly = function () {
        return this.readonly;
    };
    FormField.prototype.fromJson = function (modelFormField) {
        this.visible = true;
        if (modelFormField["visible"] != null) {
            this.visible = modelFormField["visible"];
        }
        this.labelVisible = true;
        if (modelFormField["labelVisible"] != null) {
            this.labelVisible = modelFormField["labelVisible"];
        }
        this.width = 1;
        if (modelFormField["width"] != null) {
            this.width = modelFormField["width"];
        }
        this.newRow = false;
        if (modelFormField["newRow"] != null) {
            this.newRow = modelFormField["newRow"];
        }
        this.required = false;
        if (modelFormField["required"] != null) {
            this.required = modelFormField["required"];
        }
        this.readonly = false;
        if (modelFormField["readonly"] != null) {
            this.readonly = modelFormField["readonly"];
        }
        this.id = modelFormField["id"];
        this.name = this.translationService.getText(modelFormField.name);
        this.type = modelFormField.type;
        this.height = modelFormField["height"];
    };
    return FormField;
}());
export { FormField };
//# sourceMappingURL=form-field.js.map