"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, $defaultStyle, $defaultAttr = {}, $propHandlers) {
        super({ ...$props, style: { ...$defaultStyle, ...$props.style } }, $system);
        const { style, attr } = this.$props;
        this.$element = $element;
        (0, attr_1.applyAttr)(this.$element, { ...$defaultAttr, ...attr }, {});
        (0, style_1.applyDynamicStyle)(this, this.$element, { ...$defaultStyle, ...style });
        this.$propHandler = {
            ...(0, propHandler_1.svgPropHandler)(this, this.$element, $defaultStyle, {}),
            ...$propHandlers,
        };
    }
    onPropChanged(prop, current, prev) {
        this.$propHandler[prop](current, prev);
    }
}
exports.SVGElement_ = SVGElement_;
//# sourceMappingURL=svg.js.map