import { SVGItem } from './SVGItem';
import { DOMParser } from '@xmldom/xmldom';
export class G extends SVGItem {
    constructor() {
        super();
        this.__children = [];
        this.__domElement = new DOMParser().parseFromString('<g></g>', 'image/svg+xml').documentElement;
    }
    __redraw() {
        let parent = this.parent;
        while (parent) {
            const next = parent.parent;
            if (!next) {
                parent?.__redraw?.();
            }
            parent = next;
        }
    }
    addChild(view) {
        this._addView(view);
        view._attached = true;
        this.__children.push(view);
    }
    removeChild(view) {
        this._removeView(view);
        view._attached = false;
        this.__children = this.__children.filter((item) => item !== view);
    }
}
//# sourceMappingURL=G.js.map