'use strict';

var checkMarkerInSeries = require('./checkMarkerInSeries.js');
var MarkPointModel = require('./MarkPointModel.js');
var MarkPointView = require('./MarkPointView.js');

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

exports.install = install;
