"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const categoryFilter = require("./categoryFilter.js");
const categoryVisual = require("./categoryVisual.js");
const edgeVisual = require("./edgeVisual.js");
const simpleLayout = require("./simpleLayout.js");
const circularLayout = require("./circularLayout.js");
const forceLayout = require("./forceLayout.js");
const createView = require("./createView.js");
const View = require("../../coord/View.js");
const GraphView = require("./GraphView.js");
const GraphSeries = require("./GraphSeries.js");
const roamHelper = require("../../action/roamHelper.js");
const util = require("../../../../../../zrender@5.4.4/node_modules/zrender/lib/core/util.js");
var actionInfo = {
  type: "graphRoam",
  event: "graphRoam",
  update: "none"
};
function install(registers) {
  registers.registerChartView(GraphView.default);
  registers.registerSeriesModel(GraphSeries.default);
  registers.registerProcessor(categoryFilter.default);
  registers.registerVisual(categoryVisual.default);
  registers.registerVisual(edgeVisual.default);
  registers.registerLayout(simpleLayout.default);
  registers.registerLayout(registers.PRIORITY.VISUAL.POST_CHART_LAYOUT, circularLayout.default);
  registers.registerLayout(forceLayout.default);
  registers.registerCoordinateSystem("graphView", {
    dimensions: View.default.dimensions,
    create: createView.default
  });
  registers.registerAction({
    type: "focusNodeAdjacency",
    event: "focusNodeAdjacency",
    update: "series:focusNodeAdjacency"
  }, util.noop);
  registers.registerAction({
    type: "unfocusNodeAdjacency",
    event: "unfocusNodeAdjacency",
    update: "series:unfocusNodeAdjacency"
  }, util.noop);
  registers.registerAction(actionInfo, function(payload, ecModel, api) {
    ecModel.eachComponent({
      mainType: "series",
      query: payload
    }, function(seriesModel) {
      var coordSys = seriesModel.coordinateSystem;
      var res = roamHelper.updateCenterAndZoom(coordSys, payload, void 0, api);
      seriesModel.setCenter && seriesModel.setCenter(res.center);
      seriesModel.setZoom && seriesModel.setZoom(res.zoom);
    });
  });
}
exports.install = install;
