"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var InputContainer_1 = require("./InputContainer");
var Specification = /** @class */ (function () {
    function Specification(spec) {
        this.raw = spec;
    }
    /**
     * Initializes the default specification attributes to the node
     *
     * @param node the node which will be initialized
     * @param className the className which is set to the node
     */
    Specification.prototype.initNode = function (node, className) {
        if (className)
            node.addClasses(className);
        node.setId(this.raw.id);
        node.setName(this.raw.name);
        InputContainer_1.InputContainer.setRequiredAttribute(node.unwrap(), this.raw.required);
        node.innerText(this.raw.text);
        node.addClasses("lto-" + (this.raw.position || 'left'));
        this.raw.class !== undefined ? node.addClasses(this.raw.class) : function () { };
        return node;
    };
    return Specification;
}());
exports.Specification = Specification;
//# sourceMappingURL=Specification.js.map