import brushPreprocessor from "./preprocessor.mjs";
import BrushView from "./BrushView.mjs";
import BrushModel from "./BrushModel.mjs";
import brushVisual from "./visualEncoding.mjs";
import BrushFeature from "../toolbox/feature/Brush.mjs";
import { registerFeature } from "../toolbox/featureManager.mjs";
import { noop } from "../../../../../../zrender@5.4.4/node_modules/zrender/lib/core/util.mjs";
function install(registers) {
  registers.registerComponentView(BrushView);
  registers.registerComponentModel(BrushModel);
  registers.registerPreprocessor(brushPreprocessor);
  registers.registerVisual(registers.PRIORITY.VISUAL.BRUSH, brushVisual);
  registers.registerAction({
    type: "brush",
    event: "brush",
    update: "updateVisual"
  }, function(payload, ecModel) {
    ecModel.eachComponent({
      mainType: "brush",
      query: payload
    }, function(brushModel) {
      brushModel.setAreas(payload.areas);
    });
  });
  registers.registerAction({
    type: "brushSelect",
    event: "brushSelected",
    update: "none"
  }, noop);
  registers.registerAction({
    type: "brushEnd",
    event: "brushEnd",
    update: "none"
  }, noop);
  registerFeature("brush", BrushFeature);
}
export {
  install
};
