/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import * as tslib_1 from "tslib";
import { PolarBase } from "./PolarBase";
import { PathRenderer } from "./PathRenderer";
import { DefaultFlattener } from "./DefaultFlattener";
import { PolarBaseView } from "./PolarBaseView";
import { Number_$type, Point_$type, markType } from "igniteui-react-core";
import { PolarLinePlanner } from "./PolarLinePlanner";
import { List$1 } from "igniteui-react-core";
import { isNaN_ } from "igniteui-react-core";
import { Color } from "igniteui-react-core";
/**
 * @hidden
 */
var PolarLineSeriesBase = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(PolarLineSeriesBase, _super);
    function PolarLineSeriesBase() {
        var _this = _super.call(this) || this;
        _this.pc = null;
        _this.pe = null;
        _this.pd = null;
        _this.pc = new PathRenderer(1, new DefaultFlattener());
        _this.pe = new PathRenderer(0);
        return _this;
    }
    PolarLineSeriesBase.prototype.bf = function () {
        return new PolarLineSeriesBaseView(this);
    };
    PolarLineSeriesBase.prototype.i2 = function (a) {
        _super.prototype.i2.call(this, a);
        this.pf = a;
    };
    PolarLineSeriesBase.prototype.pg = function () {
        return 1;
    };
    PolarLineSeriesBase.prototype.get_pj = function () {
        return false;
    };
    Object.defineProperty(PolarLineSeriesBase.prototype, "pj", {
        get: function () {
            return this.get_pj();
        },
        enumerable: true,
        configurable: true
    });
    PolarLineSeriesBase.prototype.get_pl = function () {
        return false;
    };
    Object.defineProperty(PolarLineSeriesBase.prototype, "pl", {
        get: function () {
            return this.get_pl();
        },
        enumerable: true,
        configurable: true
    });
    PolarLineSeriesBase.prototype.om = function (a, b) {
        var _this = this;
        _super.prototype.om.call(this, a, b);
        a.m.clear();
        var c = b.bs;
        var d = b.br;
        var e = this.nv != null ? this.nv.count : 0;
        var f = this.nw != null ? this.nw.count : 0;
        var g = Math.min(e, f);
        var h = ((function () {
            var $ret = new PolarLinePlanner();
            $ret.m = function (i) { return _this.nj.a.getScaledAngle1(_this.nv.item(i), _this.nj.e, _this.nj.d); };
            $ret.q = g;
            $ret.n = function (i) { return _this.nh.ly(_this.nw.item(i), _this.nj.g, _this.nj.f, _this.nj.i, _this.nj.h); };
            $ret.l = _this.eu;
            $ret.f = _this.n1;
            $ret.b = _this.pg();
            $ret.o = function (i) { return _this.pm(a, i); };
            $ret.p = function (i) { return _this.pn(a, i); };
            $ret.ab = d;
            $ret.ac = c;
            $ret.d = _this.pl;
            $ret.c = _this.pj;
            return $ret;
        })());
        var i = new List$1(Number_$type, 0);
        for (var j = 0; j < g; j++) {
            if (this.pk(j)) {
                i.add(j);
            }
        }
        if (this.pl && i.count > 0) {
            i.add(i._inner[0]);
        }
        h.x(a.m, i);
    };
    PolarLineSeriesBase.prototype.pm = function (a, b) {
        return a.w._inner[b].x;
    };
    PolarLineSeriesBase.prototype.pn = function (a, b) {
        return a.w._inner[b].y;
    };
    PolarLineSeriesBase.prototype.pi = function () {
        return !this.ph();
    };
    PolarLineSeriesBase.prototype.ph = function () {
        var a = this.bs.n2;
        return !a.containsPoint({ $type: Point_$type, x: 0.5, y: 0.5 });
    };
    PolarLineSeriesBase.prototype.pk = function (a) {
        return (this.nv.item(a) >= this.nj.a.kc && this.nv.item(a) <= this.nj.a.kb && this.nw.item(a) >= this.nj.b.kc && this.nw.item(a) <= this.nj.b.kb) || (isNaN_(this.nv.item(a)) || isNaN_(this.nw.item(a)));
    };
    PolarLineSeriesBase.prototype.h3 = function (a, b) {
        _super.prototype.h3.call(this, a, b);
        this.po(b);
    };
    PolarLineSeriesBase.prototype.oo = function (a, b) {
        _super.prototype.oo.call(this, a, b);
        if (this.n1) {
            this.pd = this.pc;
        }
        else {
            this.pd = this.pe;
        }
        this.pd.b = this.pg();
        this.po(b);
        this.pp(a, b);
    };
    PolarLineSeriesBase.$t = markType(PolarLineSeriesBase, 'PolarLineSeriesBase', PolarBase.$);
    return PolarLineSeriesBase;
}(PolarBase));
export { PolarLineSeriesBase };
/**
 * @hidden
 */
var PolarLineSeriesBaseView = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(PolarLineSeriesBaseView, _super);
    function PolarLineSeriesBaseView(a) {
        var _this = _super.call(this, a) || this;
        _this.cy = null;
        _this.cy = a;
        return _this;
    }
    PolarLineSeriesBaseView.prototype.ac = function () {
        var a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.lk = a;
        this.e.ev = 3;
        this.e.ew = 1;
        this.e.ex = 4;
        this.e.du = false;
    };
    PolarLineSeriesBaseView.$t = markType(PolarLineSeriesBaseView, 'PolarLineSeriesBaseView', PolarBaseView.$);
    return PolarLineSeriesBaseView;
}(PolarBaseView));
export { PolarLineSeriesBaseView };
//# sourceMappingURL=PolarLineSeriesBase_combined.js.map
