"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const namespaceURI_1 = require("../../../../../client/component/namespaceURI");
const svg_1 = require("../../../../../client/svg");
class SVGRect extends svg_1.SVGElement_ {
    constructor($props, $system) {
        super($props, $system, $system.api.document.createElementNS(namespaceURI_1.namespaceURI, 'rect'), $system.style['rect']);
        const { className, x = 0, y = 0, rx = 0, ry = 0, width = 100, height = 100, } = $props;
        if (className !== undefined) {
            this.$element.classList.value = className;
        }
        this.$element.setAttribute('x', `${x}`);
        this.$element.setAttribute('y', `${y}`);
        this.$element.setAttribute('rx', `${rx}`);
        this.$element.setAttribute('ry', `${ry}`);
        this.$element.setAttribute('width', `${width}`);
        this.$element.setAttribute('height', `${height}`);
        this.$propHandler = {
            ...this.$propHandler,
            x: (x = 0) => {
                this.$element.setAttribute('x', `${x}`);
            },
            y: (y = 0) => {
                this.$element.setAttribute('y', `${y}`);
            },
            width: (width = 0) => {
                this.$element.setAttribute('width', `${width}`);
            },
            height: (height = 0) => {
                this.$element.setAttribute('height', `${height}`);
            },
            rx: (rx = 0) => {
                this.$element.setAttribute('rx', `${rx}`);
            },
            ry: (ry = 0) => {
                this.$element.setAttribute('ry', `${ry}`);
            },
        };
    }
}
exports.default = SVGRect;
//# sourceMappingURL=Component.js.map