import checkMarkerInSeries from './checkMarkerInSeries.mjs';
import MarkPointModel from './MarkPointModel.mjs';
import MarkPointView from './MarkPointView.mjs';

function install(registers) {
  registers.registerComponentModel(MarkPointModel);
  registers.registerComponentView(MarkPointView);
  registers.registerPreprocessor(function (opt) {
    if (checkMarkerInSeries(opt.series, 'markPoint')) {
      // Make sure markPoint component is enabled
      opt.markPoint = opt.markPoint || {};
    }
  });
}

export { install };
