"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const namespaceURI_1 = require("../../../../../client/component/namespaceURI");
const svg_1 = require("../../../../../client/svg");
class SVGSVG extends svg_1.SVGElement_ {
    constructor($props, $system) {
        super($props, $system, $system.api.document.createElementNS(namespaceURI_1.namespaceURI, 'svg'), $system.style['svg'], {
            stroke: 'currentcolor',
            'stroke-width': '0',
            preserveAspectRatio: 'xMidYMid meet',
        }, {
            viewBox: (viewBox) => {
                if (viewBox === undefined) {
                    this.$element.removeAttribute('viewBox');
                }
                else {
                    this.$element.setAttribute('viewBox', viewBox);
                }
            },
            width: (width) => {
                if (width === undefined) {
                    this.$element.removeAttribute('width');
                }
                else {
                    this.$element.setAttribute('width', `${width}`);
                }
            },
            height: (height) => {
                if (height === undefined) {
                    this.$element.removeAttribute('height');
                }
                else {
                    this.$element.setAttribute('height', `${height}`);
                }
            },
            strokeWidth: (strokeWidth) => {
                if (strokeWidth === undefined) {
                    this.$element.removeAttribute('stroke-width');
                }
                else {
                    this.$element.setAttribute('stroke-width', `${strokeWidth}`);
                }
            },
        });
        const { className, viewBox } = $props;
        if (className !== undefined) {
            this.$element.classList.value = className;
        }
        if (viewBox) {
            this.$element.setAttribute('viewBox', viewBox);
        }
    }
}
exports.default = SVGSVG;
//# sourceMappingURL=Component.js.map