"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SVGGroupInstance = void 0;
const SVGInstance_js_1 = require("../../browser/instance/SVGInstance.js");
//-- Mixins
const index_js_1 = require("../mixins/index.js");
// Permitted content
const shapeInstances_js_1 = require("../mixins/permitted-content/shapeInstances.js");
const SVGSVGInstance_js_1 = require("./SVGSVGInstance.js");
// Presentation attributes
const color_js_1 = require("../mixins/presentation-attributes/color.js");
const display_js_1 = require("../mixins/presentation-attributes/display.js");
const fill_js_1 = require("../mixins/presentation-attributes/fill.js");
const opacity_js_1 = require("../mixins/presentation-attributes/opacity.js");
const stroke_js_1 = require("../mixins/presentation-attributes/stroke.js");
const vectorEffect_js_1 = require("../mixins/presentation-attributes/vectorEffect.js");
const visibility_js_1 = require("../mixins/presentation-attributes/visibility.js");
//-- Class
class SVGGroupInstance extends SVGInstance_js_1.SVGInstance {
    constructor(_parent) {
        super("g", _parent);
    }
    addGroup() {
        const group = new SVGGroupInstance(this);
        this.appendInstance(group);
        return group;
    }
    addSVG(width, height) {
        if (typeof width !== "undefined" && typeof height !== "undefined") {
            const svg = new SVGSVGInstance_js_1.SVGSVGInstance(width, height);
            this.appendInstance(svg);
            return svg;
        }
        else {
            const svg = new SVGSVGInstance_js_1.SVGSVGInstance();
            this.appendInstance(svg);
            return svg;
        }
    }
}
exports.SVGGroupInstance = SVGGroupInstance;
(0, index_js_1.applyMixins)(SVGGroupInstance, [
    shapeInstances_js_1.ShapeInstances,
    color_js_1.Color,
    display_js_1.Display,
    fill_js_1.Fill,
    opacity_js_1.Opacity,
    stroke_js_1.Stroke,
    vectorEffect_js_1.VectorEffect,
    visibility_js_1.Visibility
]);
//# sourceMappingURL=SVGGroupInstance.js.map