import { __extends } from '../../../../../../tslib@2.3.0/node_modules/tslib/tslib.es6.mjs';
import { use } from '../../extension.mjs';
import AxisView from '../axis/AxisView.mjs';
import PolarAxisPointer from '../axisPointer/PolarAxisPointer.mjs';
import { install as install$1 } from '../axisPointer/install.mjs';
import PolarModel from '../../coord/polar/PolarModel.mjs';
import axisModelCreator from '../../coord/axisModelCreator.mjs';
import { AngleAxisModel, RadiusAxisModel } from '../../coord/polar/AxisModel.mjs';
import polarCreator from '../../coord/polar/polarCreator.mjs';
import AngleAxisView from '../axis/AngleAxisView.mjs';
import RadiusAxisView from '../axis/RadiusAxisView.mjs';
import ComponentView from '../../view/Component.mjs';
import { curry } from '../../../../../../zrender@6.0.0/node_modules/zrender/lib/core/util.mjs';
import barLayoutPolar from '../../layout/barPolar.mjs';

var angleAxisExtraOption = {
  startAngle: 90,
  clockwise: true,
  splitNumber: 12,
  axisLabel: {
    rotate: 0
  }
};
var radiusAxisExtraOption = {
  splitNumber: 5
};
var PolarView = /** @class */function (_super) {
  __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;
}(ComponentView);
function install(registers) {
  use(install$1);
  AxisView.registerAxisPointerClass('PolarAxisPointer', PolarAxisPointer);
  registers.registerCoordinateSystem('polar', polarCreator);
  registers.registerComponentModel(PolarModel);
  registers.registerComponentView(PolarView);
  // Model and view for angleAxis and radiusAxis
  axisModelCreator(registers, 'angle', AngleAxisModel, angleAxisExtraOption);
  axisModelCreator(registers, 'radius', RadiusAxisModel, radiusAxisExtraOption);
  registers.registerComponentView(AngleAxisView);
  registers.registerComponentView(RadiusAxisView);
  registers.registerLayout(curry(barLayoutPolar, 'bar'));
}

export { install };
