"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const html_1 = require("../../../../client/html");
class H2 extends html_1.default {
    constructor($props, $system) {
        super($props, $system, $system.api.document.createElement('h2'), $system.style['h2']);
        const { id, className, innerText, tabIndex, title, draggable } = this.$props;
        this.$element = this.$system.api.document.createElement('h2');
        if (id !== undefined) {
            this.$element.id = id;
        }
        if (className !== undefined) {
            this.$element.className = className;
        }
        if (innerText) {
            this.$element.innerText = innerText;
        }
        if (tabIndex !== undefined) {
            this.$element.tabIndex = tabIndex;
        }
        if (title) {
            this.$element.title = title;
        }
        if (draggable !== undefined) {
            this.$element.setAttribute('draggable', draggable.toString());
        }
    }
}
exports.default = H2;
//# sourceMappingURL=Component.js.map