"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const index_esm = require("../../../min-dash/dist/index.esm.js");
const index_es = require("../../../inherits-browser/dist/index.es.js");
const index = require("../../../object-refs/index.js");
var s = new index.default({ name: "children", enumerable: true, collection: true }, { name: "parent" }), c = new index.default({ name: "labels", enumerable: true, collection: true }, { name: "labelTarget" }), l = new index.default({ name: "attachers", collection: true }, { name: "host" }), b = new index.default({ name: "outgoing", collection: true }, { name: "source" }), h = new index.default({ name: "incoming", collection: true }, { name: "target" });
function r() {
  Object.defineProperty(this, "businessObject", {
    writable: true
  }), Object.defineProperty(this, "label", {
    get: function() {
      return this.labels[0];
    },
    set: function(t) {
      var a = this.label, n = this.labels;
      !t && a ? n.remove(a) : n.add(t, 0);
    }
  }), s.bind(this, "parent"), c.bind(this, "labels"), b.bind(this, "outgoing"), h.bind(this, "incoming");
}
function e() {
  r.call(this), s.bind(this, "children"), l.bind(this, "host"), l.bind(this, "attachers");
}
index_es.default(e, r);
function u() {
  e.call(this);
}
index_es.default(u, e);
function m() {
  e.call(this), c.bind(this, "labelTarget");
}
index_es.default(m, e);
function f() {
  r.call(this), b.bind(this, "source"), h.bind(this, "target");
}
index_es.default(f, r);
var g = {
  connection: f,
  shape: e,
  label: m,
  root: u
};
function v(t, a) {
  var n = g[t];
  if (!n)
    throw new Error("unknown type: <" + t + ">");
  return index_esm.assign(new n(), a);
}
exports.Base = r;
exports.Connection = f;
exports.Label = m;
exports.Root = u;
exports.Shape = e;
exports.create = v;
