import { curry } from "../../../../../../zrender@5.4.4/node_modules/zrender/lib/core/util.mjs";
import { createProgressiveLayout, layout } from "../../layout/barGrid.mjs";
import dataSample from "../../processor/dataSample.mjs";
import BarSeries from "./BarSeries.mjs";
import BarView from "./BarView.mjs";
function install(registers) {
  registers.registerChartView(BarView);
  registers.registerSeriesModel(BarSeries);
  registers.registerLayout(registers.PRIORITY.VISUAL.LAYOUT, curry(layout, "bar"));
  registers.registerLayout(registers.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT, createProgressiveLayout("bar"));
  registers.registerProcessor(registers.PRIORITY.PROCESSOR.STATISTIC, dataSample("bar"));
  registers.registerAction({
    type: "changeAxisOrder",
    event: "changeAxisOrder",
    update: "update"
  }, function(payload, ecModel) {
    var componentType = payload.componentType || "series";
    ecModel.eachComponent({
      mainType: componentType,
      query: payload
    }, function(componentModel) {
      if (payload.sortInfo) {
        componentModel.axis.setCategorySortInfo(payload.sortInfo);
      }
    });
  });
}
export {
  install
};
