/*
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 { __extends } 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) {
    __extends(PolarLineSeriesBase, _super);
    function PolarLineSeriesBase() {
        var _this = _super.call(this) || this;
        _this.y8 = null;
        _this.za = null;
        _this.y9 = null;
        _this.y8 = new PathRenderer(1, new DefaultFlattener());
        _this.za = new PathRenderer(0);
        return _this;
    }
    PolarLineSeriesBase.prototype.get_wm = function () {
        return true;
    };
    PolarLineSeriesBase.prototype.wr = function () {
        return true;
    };
    PolarLineSeriesBase.prototype.cg = function () {
        return new PolarLineSeriesBaseView(this);
    };
    PolarLineSeriesBase.prototype.o0 = function (a) {
        _super.prototype.o0.call(this, a);
        this.zb = a;
    };
    PolarLineSeriesBase.prototype.zc = function () {
        return 1;
    };
    PolarLineSeriesBase.prototype.get_zf = function () {
        return false;
    };
    Object.defineProperty(PolarLineSeriesBase.prototype, "zf", {
        get: function () {
            return this.get_zf();
        },
        enumerable: false,
        configurable: true
    });
    PolarLineSeriesBase.prototype.get_zh = function () {
        return false;
    };
    Object.defineProperty(PolarLineSeriesBase.prototype, "zh", {
        get: function () {
            return this.get_zh();
        },
        enumerable: false,
        configurable: true
    });
    PolarLineSeriesBase.prototype.x6 = function (a, b) {
        var _this = this;
        _super.prototype.x6.call(this, a, b);
        a.m.clear();
        var c = b.by;
        var d = b.bx;
        var e = this.wc != null ? this.wc.count : 0;
        var f = this.wd != null ? this.wd.count : 0;
        var g = Math.min(e, f);
        var h = ((function () {
            var $ret = new PolarLinePlanner();
            $ret.m = function (i) { return _this.vu.a.getScaledAngle1(_this.wc.item(i), _this.vu.e, _this.vu.d); };
            $ret.q = g;
            $ret.n = function (i) { return _this.vs.nv(_this.wd.item(i), _this.vu.g, _this.vu.f, _this.vu.i, _this.vu.h); };
            $ret.l = _this.hj;
            $ret.f = _this.ws;
            $ret.b = _this.zc();
            $ret.o = function (i) { return _this.zi(a, i); };
            $ret.p = function (i) { return _this.zj(a, i); };
            $ret.ab = d;
            $ret.ac = c;
            $ret.d = _this.zh;
            $ret.c = _this.zf;
            return $ret;
        })());
        var i = new List$1(Number_$type, 0);
        for (var j = 0; j < g; j++) {
            if (this.zg(j)) {
                i.add(j);
            }
        }
        if (this.zh && i.count > 0) {
            i.add(i._inner[0]);
        }
        h.x(a.m, i);
    };
    PolarLineSeriesBase.prototype.zi = function (a, b) {
        return a.w._inner[b].x;
    };
    PolarLineSeriesBase.prototype.zj = function (a, b) {
        return a.w._inner[b].y;
    };
    PolarLineSeriesBase.prototype.ze = function () {
        return !this.zd();
    };
    PolarLineSeriesBase.prototype.zd = function () {
        var a = this.cy.tn;
        return !a.containsPoint({ $type: Point_$type, x: 0.5, y: 0.5 });
    };
    PolarLineSeriesBase.prototype.zg = function (a) {
        return (this.wc.item(a) >= this.vu.a.lx && this.wc.item(a) <= this.vu.a.lw && this.wd.item(a) >= this.vu.b.lx && this.wd.item(a) <= this.vu.b.lw) || (isNaN_(this.wc.item(a)) || isNaN_(this.wd.item(a)));
    };
    PolarLineSeriesBase.prototype.nj = function (a, b) {
        _super.prototype.nj.call(this, a, b);
        this.zk(b);
    };
    PolarLineSeriesBase.prototype.ya = function (a, b) {
        _super.prototype.ya.call(this, a, b);
        if (this.ws) {
            this.y9 = this.y8;
        }
        else {
            this.y9 = this.za;
        }
        this.y9.b = this.zc();
        this.zk(b);
        this.zl(a, b);
    };
    PolarLineSeriesBase.$t = markType(PolarLineSeriesBase, 'PolarLineSeriesBase', PolarBase.$);
    return PolarLineSeriesBase;
}(PolarBase));
export { PolarLineSeriesBase };
/**
 * @hidden
 */
var PolarLineSeriesBaseView = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(PolarLineSeriesBaseView, _super);
    function PolarLineSeriesBaseView(a) {
        var _this = _super.call(this, a) || this;
        _this.c6 = null;
        _this.c6 = a;
        return _this;
    }
    PolarLineSeriesBaseView.prototype.af = function () {
        var a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.s6 = a;
        this.e.ir = 3;
        this.e.is = 1;
        this.e.it = 4;
        this.e.gj = false;
    };
    PolarLineSeriesBaseView.$t = markType(PolarLineSeriesBaseView, 'PolarLineSeriesBaseView', PolarBaseView.$);
    return PolarLineSeriesBaseView;
}(PolarBaseView));
export { PolarLineSeriesBaseView };
