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