"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const element_1 = require("../../../../client/element");
const propHandler_1 = require("../../../../client/propHandler");
const DEFAULT_STYLE = {};
class Style_ extends element_1.Element {
    constructor($props, $system) {
        super($props, $system);
        const { id, attr = {} } = this.$props;
        this.$element = this.$system.api.document.createElement('style');
        if (id !== undefined) {
            this.$element.id = id;
        }
        this._prop_handler = Object.assign(Object.assign({}, (0, propHandler_1.htmlPropHandler)(this, this.$element, DEFAULT_STYLE)), { value: (current) => {
                this.$element.innerHTML = current;
            } });
    }
    onPropChanged(prop, current) {
        this._prop_handler[prop](current);
    }
}
exports.default = Style_;
//# sourceMappingURL=Component.js.map