"use strict";
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Renderables_1 = require("../../Renderables");
var BaseInput_1 = require("../BaseInput");
/**
 * Implementation of the 'text' markup element.
 * An input HTML element of type text is created and
 * the given attributes name, placeholder and value from
 * the markup are applied. The class lto-text is
 * added to allow CSS manipulations.
 *
 * @see {@link IRenderable}
 */
var Text = /** @class */ (function (_super) {
    __extends(Text, _super);
    function Text(spec) {
        return _super.call(this, spec) || this;
    }
    /**
     * @inheritDoc
     */
    Text.prototype.render = function (renderer, isNested) {
        var text = this.initInput("text", "lto-text", isNested);
        if (this.spec.regex) {
            text.pattern = this.spec.regex;
        }
        return text;
    };
    return Text;
}(BaseInput_1.BaseInput));
exports.Text = Text;
Renderables_1.default.register("text", Text);
//# sourceMappingURL=index.js.map