import checkMarkerInSeries from './checkMarkerInSeries.mjs';
import MarkLineModel from './MarkLineModel.mjs';
import MarkLineView from './MarkLineView.mjs';

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

export { install };
