/*
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.za = null;
        _this.zc = null;
        _this.zb = null;
        _this.za = new PathRenderer(1, new DefaultFlattener());
        _this.zc = new PathRenderer(0);
        return _this;
    }
    PolarLineSeriesBase.prototype.get_wo = function () {
        return true;
    };
    PolarLineSeriesBase.prototype.wt = function () {
        return true;
    };
    PolarLineSeriesBase.prototype.cd = function () {
        return new PolarLineSeriesBaseView(this);
    };
    PolarLineSeriesBase.prototype.o2 = function (a) {
        _super.prototype.o2.call(this, a);
        this.zd = a;
    };
    PolarLineSeriesBase.prototype.ze = function () {
        return 1;
    };
    PolarLineSeriesBase.prototype.get_zh = function () {
        return false;
    };
    Object.defineProperty(PolarLineSeriesBase.prototype, "zh", {
        get: function () {
            return this.get_zh();
        },
        enumerable: false,
        configurable: true
    });
    PolarLineSeriesBase.prototype.get_zj = function () {
        return false;
    };
    Object.defineProperty(PolarLineSeriesBase.prototype, "zj", {
        get: function () {
            return this.get_zj();
        },
        enumerable: false,
        configurable: true
    });
    PolarLineSeriesBase.prototype.x8 = function (a, b) {
        var _this = this;
        _super.prototype.x8.call(this, a, b);
        a.m.clear();
        var c = b.by;
        var d = b.bx;
        var e = this.we != null ? this.we.count : 0;
        var f = this.wf != null ? this.wf.count : 0;
        var g = Math.min(e, f);
        var h = ((function () {
            var $ret = new PolarLinePlanner();
            $ret.m = function (i) { return _this.vr.a.getScaledAngle1(_this.we.item(i), _this.vr.e, _this.vr.d); };
            $ret.q = g;
            $ret.n = function (i) { return _this.vp.nv(_this.wf.item(i), _this.vr.g, _this.vr.f, _this.vr.i, _this.vr.h); };
            $ret.l = _this.hk;
            $ret.f = _this.wu;
            $ret.b = _this.ze();
            $ret.o = function (i) { return _this.zk(a, i); };
            $ret.p = function (i) { return _this.zl(a, i); };
            $ret.ab = d;
            $ret.ac = c;
            $ret.d = _this.zj;
            $ret.c = _this.zh;
            return $ret;
        })());
        var i = new List$1(Number_$type, 0);
        for (var j = 0; j < g; j++) {
            if (this.zi(j)) {
                i.add(j);
            }
        }
        if (this.zj && i.count > 0) {
            i.add(i._inner[0]);
        }
        h.x(a.m, i);
    };
    PolarLineSeriesBase.prototype.zk = function (a, b) {
        return a.w._inner[b].x;
    };
    PolarLineSeriesBase.prototype.zl = function (a, b) {
        return a.w._inner[b].y;
    };
    PolarLineSeriesBase.prototype.zg = function () {
        return !this.zf();
    };
    PolarLineSeriesBase.prototype.zf = function () {
        var a = this.cv.tr;
        return !a.containsPoint({ $type: Point_$type, x: 0.5, y: 0.5 });
    };
    PolarLineSeriesBase.prototype.zi = function (a) {
        return (this.we.item(a) >= this.vr.a.lx && this.we.item(a) <= this.vr.a.lw && this.wf.item(a) >= this.vr.b.lx && this.wf.item(a) <= this.vr.b.lw) || (isNaN_(this.we.item(a)) || isNaN_(this.wf.item(a)));
    };
    PolarLineSeriesBase.prototype.nk = function (a, b) {
        _super.prototype.nk.call(this, a, b);
        this.zm(b);
    };
    PolarLineSeriesBase.prototype.yc = function (a, b) {
        _super.prototype.yc.call(this, a, b);
        if (this.wu) {
            this.zb = this.za;
        }
        else {
            this.zb = this.zc;
        }
        this.zb.b = this.ze();
        this.zm(b);
        this.zn(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.s8 = a;
        this.e.is = 3;
        this.e.it = 1;
        this.e.iu = 4;
        this.e.gk = false;
    };
    PolarLineSeriesBaseView.$t = markType(PolarLineSeriesBaseView, 'PolarLineSeriesBaseView', PolarBaseView.$);
    return PolarLineSeriesBaseView;
}(PolarBaseView));
export { PolarLineSeriesBaseView };
