/*
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-angular-core";
import { PolarLinePlanner } from "./PolarLinePlanner";
import { List$1 } from "igniteui-angular-core";
import { isNaN_ } from "igniteui-angular-core";
import { Color } from "igniteui-angular-core";
/**
 * @hidden
 */
var PolarLineSeriesBase = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(PolarLineSeriesBase, _super);
    function PolarLineSeriesBase() {
        var _this = _super.call(this) || this;
        _this.u6 = null;
        _this.u8 = null;
        _this.u7 = null;
        _this.u6 = new PathRenderer(1, new DefaultFlattener());
        _this.u8 = new PathRenderer(0);
        return _this;
    }
    PolarLineSeriesBase.prototype.get_st = function () {
        return true;
    };
    PolarLineSeriesBase.prototype.bx = function () {
        return new PolarLineSeriesBaseView(this);
    };
    PolarLineSeriesBase.prototype.l2 = function (a) {
        _super.prototype.l2.call(this, a);
        this.u9 = a;
    };
    PolarLineSeriesBase.prototype.va = function () {
        return 1;
    };
    PolarLineSeriesBase.prototype.get_vd = function () {
        return false;
    };
    Object.defineProperty(PolarLineSeriesBase.prototype, "vd", {
        get: function () {
            return this.get_vd();
        },
        enumerable: false,
        configurable: true
    });
    PolarLineSeriesBase.prototype.get_vf = function () {
        return false;
    };
    Object.defineProperty(PolarLineSeriesBase.prototype, "vf", {
        get: function () {
            return this.get_vf();
        },
        enumerable: false,
        configurable: true
    });
    PolarLineSeriesBase.prototype.t6 = function (a, b) {
        var _this = this;
        _super.prototype.t6.call(this, a, b);
        a.m.clear();
        var c = b.bv;
        var d = b.bu;
        var e = this.sj != null ? this.sj.count : 0;
        var f = this.sk != null ? this.sk.count : 0;
        var g = Math.min(e, f);
        var h = ((function () {
            var $ret = new PolarLinePlanner();
            $ret.m = function (i) { return _this.r1.a.getScaledAngle1(_this.sj.item(i), _this.r1.e, _this.r1.d); };
            $ret.q = g;
            $ret.n = function (i) { return _this.rz.nt(_this.sk.item(i), _this.r1.g, _this.r1.f, _this.r1.i, _this.r1.h); };
            $ret.l = _this.fv;
            $ret.f = _this.sy;
            $ret.b = _this.va();
            $ret.o = function (i) { return _this.vg(a, i); };
            $ret.p = function (i) { return _this.vh(a, i); };
            $ret.ab = d;
            $ret.ac = c;
            $ret.d = _this.vf;
            $ret.c = _this.vd;
            return $ret;
        })());
        var i = new List$1(Number_$type, 0);
        for (var j = 0; j < g; j++) {
            if (this.ve(j)) {
                i.add(j);
            }
        }
        if (this.vf && i.count > 0) {
            i.add(i._inner[0]);
        }
        h.x(a.m, i);
    };
    PolarLineSeriesBase.prototype.vg = function (a, b) {
        return a.w._inner[b].x;
    };
    PolarLineSeriesBase.prototype.vh = function (a, b) {
        return a.w._inner[b].y;
    };
    PolarLineSeriesBase.prototype.vc = function () {
        return !this.vb();
    };
    PolarLineSeriesBase.prototype.vb = function () {
        var a = this.cd.s9;
        return !a.containsPoint({ $type: Point_$type, x: 0.5, y: 0.5 });
    };
    PolarLineSeriesBase.prototype.ve = function (a) {
        return (this.sj.item(a) >= this.r1.a.lv && this.sj.item(a) <= this.r1.a.lu && this.sk.item(a) >= this.r1.b.lv && this.sk.item(a) <= this.r1.b.lu) || (isNaN_(this.sj.item(a)) || isNaN_(this.sk.item(a)));
    };
    PolarLineSeriesBase.prototype.k0 = function (a, b) {
        _super.prototype.k0.call(this, a, b);
        this.vi(b);
    };
    PolarLineSeriesBase.prototype.ua = function (a, b) {
        _super.prototype.ua.call(this, a, b);
        if (this.sy) {
            this.u7 = this.u6;
        }
        else {
            this.u7 = this.u8;
        }
        this.u7.b = this.va();
        this.vi(b);
        this.vj(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.c3 = null;
        _this.c3 = a;
        return _this;
    }
    PolarLineSeriesBaseView.prototype.af = function () {
        var a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.pf = a;
        this.e.gy = 3;
        this.e.gz = 1;
        this.e.g0 = 4;
        this.e.e9 = false;
    };
    PolarLineSeriesBaseView.$t = markType(PolarLineSeriesBaseView, 'PolarLineSeriesBaseView', PolarBaseView.$);
    return PolarLineSeriesBaseView;
}(PolarBaseView));
export { PolarLineSeriesBaseView };
