"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const Elements = require("../../util/Elements.js");
function m(t, a, c, o) {
  t.on("element.changed", function(e) {
    var n = e.element;
    (n.parent || n === a.getRootElement()) && (e.gfx = c.getGraphics(n)), e.gfx && t.fire(Elements.getType(n) + ".changed", e);
  }), t.on("elements.changed", function(e) {
    var n = e.elements;
    n.forEach(function(f) {
      t.fire("element.changed", { element: f });
    }), o.updateContainments(n);
  }), t.on("shape.changed", function(e) {
    o.update("shape", e.element, e.gfx);
  }), t.on("connection.changed", function(e) {
    o.update("connection", e.element, e.gfx);
  });
}
m.$inject = [
  "eventBus",
  "canvas",
  "elementRegistry",
  "graphicsFactory"
];
exports.default = m;
