/*
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.u1 = null;
        _this.u3 = null;
        _this.u2 = null;
        _this.u1 = new PathRenderer(1, new DefaultFlattener());
        _this.u3 = new PathRenderer(0);
        return _this;
    }
    PolarLineSeriesBase.prototype.get_so = function () {
        return true;
    };
    PolarLineSeriesBase.prototype.bx = function () {
        return new PolarLineSeriesBaseView(this);
    };
    PolarLineSeriesBase.prototype.ly = function (a) {
        _super.prototype.ly.call(this, a);
        this.u4 = a;
    };
    PolarLineSeriesBase.prototype.u5 = function () {
        return 1;
    };
    PolarLineSeriesBase.prototype.get_u8 = function () {
        return false;
    };
    Object.defineProperty(PolarLineSeriesBase.prototype, "u8", {
        get: function () {
            return this.get_u8();
        },
        enumerable: false,
        configurable: true
    });
    PolarLineSeriesBase.prototype.get_va = function () {
        return false;
    };
    Object.defineProperty(PolarLineSeriesBase.prototype, "va", {
        get: function () {
            return this.get_va();
        },
        enumerable: false,
        configurable: true
    });
    PolarLineSeriesBase.prototype.t1 = function (a, b) {
        var _this = this;
        _super.prototype.t1.call(this, a, b);
        a.m.clear();
        var c = b.bv;
        var d = b.bu;
        var e = this.se != null ? this.se.count : 0;
        var f = this.sf != null ? this.sf.count : 0;
        var g = Math.min(e, f);
        var h = ((function () {
            var $ret = new PolarLinePlanner();
            $ret.m = function (i) { return _this.rw.a.getScaledAngle1(_this.se.item(i), _this.rw.e, _this.rw.d); };
            $ret.q = g;
            $ret.n = function (i) { return _this.ru.nt(_this.sf.item(i), _this.rw.g, _this.rw.f, _this.rw.i, _this.rw.h); };
            $ret.l = _this.ft;
            $ret.f = _this.st;
            $ret.b = _this.u5();
            $ret.o = function (i) { return _this.vb(a, i); };
            $ret.p = function (i) { return _this.vc(a, i); };
            $ret.ab = d;
            $ret.ac = c;
            $ret.d = _this.va;
            $ret.c = _this.u8;
            return $ret;
        })());
        var i = new List$1(Number_$type, 0);
        for (var j = 0; j < g; j++) {
            if (this.u9(j)) {
                i.add(j);
            }
        }
        if (this.va && i.count > 0) {
            i.add(i._inner[0]);
        }
        h.x(a.m, i);
    };
    PolarLineSeriesBase.prototype.vb = function (a, b) {
        return a.w._inner[b].x;
    };
    PolarLineSeriesBase.prototype.vc = function (a, b) {
        return a.w._inner[b].y;
    };
    PolarLineSeriesBase.prototype.u7 = function () {
        return !this.u6();
    };
    PolarLineSeriesBase.prototype.u6 = function () {
        var a = this.cd.sf;
        return !a.containsPoint({ $type: Point_$type, x: 0.5, y: 0.5 });
    };
    PolarLineSeriesBase.prototype.u9 = function (a) {
        return (this.se.item(a) >= this.rw.a.lv && this.se.item(a) <= this.rw.a.lu && this.sf.item(a) >= this.rw.b.lv && this.sf.item(a) <= this.rw.b.lu) || (isNaN_(this.se.item(a)) || isNaN_(this.sf.item(a)));
    };
    PolarLineSeriesBase.prototype.kx = function (a, b) {
        _super.prototype.kx.call(this, a, b);
        this.vd(b);
    };
    PolarLineSeriesBase.prototype.t5 = function (a, b) {
        _super.prototype.t5.call(this, a, b);
        if (this.st) {
            this.u2 = this.u1;
        }
        else {
            this.u2 = this.u3;
        }
        this.u2.b = this.u5();
        this.vd(b);
        this.ve(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.pa = a;
        this.e.gw = 3;
        this.e.gx = 1;
        this.e.gy = 4;
        this.e.e7 = false;
    };
    PolarLineSeriesBaseView.$t = markType(PolarLineSeriesBaseView, 'PolarLineSeriesBaseView', PolarBaseView.$);
    return PolarLineSeriesBaseView;
}(PolarBaseView));
export { PolarLineSeriesBaseView };
