"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Renderables_1 = require("../Renderables");
var node_1 = require("../../support/node");
var Specification_1 = require("../../support/Specification");
/**
 * Implementation of the 'headline' markup element.
 * With no level set, a h2 HTML element is created and the class
 * lto-headline is added to allow CSS manipulations.
 *
 * @see {@link IRenderable}
 */
var Headline = /** @class */ (function () {
    function Headline(spec) {
        this.spec = spec;
    }
    /**
     * @inheritDoc
     */
    Headline.prototype.render = function (renderer, isNested) {
        var tag = "h2";
        if (this.spec.level) {
            tag = "h" + this.spec.level;
        }
        var headline = node_1.default(tag);
        new Specification_1.Specification(this.spec).initNode(headline, "lto-headline");
        return headline.unwrap();
    };
    return Headline;
}());
exports.Headline = Headline;
Renderables_1.default.register("headline", Headline);
//# sourceMappingURL=index.js.map