"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SVGElement_ = void 0;
const attr_1 = require("./attr");
const element_1 = require("./element");
const propHandler_1 = require("./propHandler");
const style_1 = require("./style");
class SVGElement_ extends element_1.Element {
    constructor($props, $system, $element, DEFAULT_STYLE) {
        super($props, $system);
        const { style, attr = {} } = this.$props;
        this.$element = $element;
        if (attr) {
            (0, attr_1.applyAttr)(this.$element, attr);
        }
        (0, style_1.applyDynamicStyle)(this, this.$element, { ...DEFAULT_STYLE, ...style });
        this.$propHandler = {
            ...(0, propHandler_1.svgPropHandler)(this, this.$element, DEFAULT_STYLE),
        };
    }
    onPropChanged(prop, current) {
        this.$propHandler[prop](current);
    }
}
exports.SVGElement_ = SVGElement_;
//# sourceMappingURL=svg.js.map