"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const namespaceURI_1 = require("../../../../../client/component/namespaceURI");
const svg_1 = require("../../../../../client/svg");
class SVGTextPath extends svg_1.SVGElement_ {
    constructor($props, $system) {
        super($props, $system, $system.api.document.createElementNS(namespaceURI_1.namespaceURI, 'textPath'), $system.style['textpath']);
        const { className, href, startOffset, lengthAdjust, spacing, textContent, rotate, } = this.$props;
        if (className) {
            this.$element.classList.add(className);
        }
        if (href !== undefined) {
            this.$element.setAttribute('href', href);
        }
        if (startOffset !== undefined) {
            this.$element.setAttribute('startOffset', startOffset);
        }
        if (lengthAdjust !== undefined) {
            this.$element.setAttribute('lengthAdjust', lengthAdjust);
        }
        if (spacing !== undefined) {
            this.$element.setAttribute('spacing', spacing);
        }
        if (textContent !== undefined) {
            this.$element.textContent = textContent;
        }
        if (rotate !== undefined) {
            this.$element.setAttribute('rotate', rotate);
        }
        this.$propHandler = {
            ...this.$propHandler,
            textContent: (current) => {
                this.$element.textContent = current;
            },
        };
    }
}
exports.default = SVGTextPath;
//# sourceMappingURL=Component.js.map