'use strict';

var checkMarkerInSeries = require('./checkMarkerInSeries.js');
var MarkLineModel = require('./MarkLineModel.js');
var MarkLineView = require('./MarkLineView.js');

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

exports.install = install;
