import Renderables from '../Renderables';
/**
 * Implementation of the 'bold' markup element. A
 * b HTML element is created and the lto-bold class
 * is added to allow CSS modifications.
 *
 * @see {@link IRenderable}
 */
var Bold = /** @class */ (function () {
    function Bold(message) {
        this.spec = message;
    }
    /**
     * @inheritDoc
     */
    Bold.prototype.render = function (renderer, isNested) {
        var bold = document.createElement('b');
        bold.classList.add('lto-bold');
        if (this.spec.id !== undefined) {
            bold.id = this.spec.id;
        }
        if (this.spec.class !== undefined) {
            this.spec.class.split(" ").forEach(function (e) { return bold.classList.add(e); });
        }
        bold.appendChild(document.createTextNode(this.spec.text || ""));
        return bold;
    };
    return Bold;
}());
export { Bold };
Renderables.register("bold", Bold);
//# sourceMappingURL=index.js.map