'use strict';

var tslib_es6 = require('../../../../../../tslib@2.3.0/node_modules/tslib/tslib.es6.js');
var extension = require('../../extension.js');
var AxisView = require('../axis/AxisView.js');
var PolarAxisPointer = require('../axisPointer/PolarAxisPointer.js');
var install$1 = require('../axisPointer/install.js');
var PolarModel = require('../../coord/polar/PolarModel.js');
var axisModelCreator = require('../../coord/axisModelCreator.js');
var AxisModel = require('../../coord/polar/AxisModel.js');
var polarCreator = require('../../coord/polar/polarCreator.js');
var AngleAxisView = require('../axis/AngleAxisView.js');
var RadiusAxisView = require('../axis/RadiusAxisView.js');
var Component = require('../../view/Component.js');
var util = require('../../../../../../zrender@6.0.0/node_modules/zrender/lib/core/util.js');
var barPolar = require('../../layout/barPolar.js');

var angleAxisExtraOption = {
  startAngle: 90,
  clockwise: true,
  splitNumber: 12,
  axisLabel: {
    rotate: 0
  }
};
var radiusAxisExtraOption = {
  splitNumber: 5
};
var PolarView = /** @class */function (_super) {
  tslib_es6.__extends(PolarView, _super);
  function PolarView() {
    var _this = _super !== null && _super.apply(this, arguments) || this;
    _this.type = PolarView.type;
    return _this;
  }
  PolarView.type = 'polar';
  return PolarView;
}(Component.default);
function install(registers) {
  extension.use(install$1.install);
  AxisView.default.registerAxisPointerClass('PolarAxisPointer', PolarAxisPointer.default);
  registers.registerCoordinateSystem('polar', polarCreator.default);
  registers.registerComponentModel(PolarModel.default);
  registers.registerComponentView(PolarView);
  // Model and view for angleAxis and radiusAxis
  axisModelCreator.default(registers, 'angle', AxisModel.AngleAxisModel, angleAxisExtraOption);
  axisModelCreator.default(registers, 'radius', AxisModel.RadiusAxisModel, radiusAxisExtraOption);
  registers.registerComponentView(AngleAxisView.default);
  registers.registerComponentView(RadiusAxisView.default);
  registers.registerLayout(util.curry(barPolar.default, 'bar'));
}

exports.install = install;
