"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const index_esm = require("../../didi/dist/index.esm.js");
const index = require("./core/index.js");
function bootstrap(modules) {
  var injector = new index_esm.Injector(modules);
  injector.init();
  return injector;
}
function createInjector(options) {
  options = options || {};
  var configModule = {
    "config": ["value", options]
  };
  var modules = [configModule, index.default].concat(options.modules || []);
  return bootstrap(modules);
}
function Diagram(options, injector) {
  this.injector = injector = injector || createInjector(options);
  this.get = injector.get;
  this.invoke = injector.invoke;
  this.get("eventBus").fire("diagram.init");
}
Diagram.prototype.destroy = function() {
  this.get("eventBus").fire("diagram.destroy");
};
Diagram.prototype.clear = function() {
  this.get("eventBus").fire("diagram.clear");
};
exports.default = Diagram;
