"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
var DEFAULT_RENDER_PRIORITY = 1e3;
function BaseRenderer(eventBus, renderPriority) {
  var self = this;
  renderPriority = renderPriority || DEFAULT_RENDER_PRIORITY;
  eventBus.on(["render.shape", "render.connection"], renderPriority, function(evt, context) {
    var type = evt.type, element = context.element, visuals = context.gfx, attrs = context.attrs;
    if (self.canRender(element)) {
      if (type === "render.shape") {
        return self.drawShape(visuals, element, attrs);
      } else {
        return self.drawConnection(visuals, element, attrs);
      }
    }
  });
  eventBus.on(["render.getShapePath", "render.getConnectionPath"], renderPriority, function(evt, element) {
    if (self.canRender(element)) {
      if (evt.type === "render.getShapePath") {
        return self.getShapePath(element);
      } else {
        return self.getConnectionPath(element);
      }
    }
  });
}
BaseRenderer.prototype.canRender = function() {
};
BaseRenderer.prototype.drawShape = function() {
};
BaseRenderer.prototype.drawConnection = function() {
};
BaseRenderer.prototype.getShapePath = function() {
};
BaseRenderer.prototype.getConnectionPath = function() {
};
exports.default = BaseRenderer;
