/*
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.sv = null;
        _this.sx = null;
        _this.sw = null;
        _this.sv = new PathRenderer(1, new DefaultFlattener());
        _this.sx = new PathRenderer(0);
        return _this;
    }
    PolarLineSeriesBase.prototype.get_qu = function () {
        return true;
    };
    PolarLineSeriesBase.prototype.bp = function () {
        return new PolarLineSeriesBaseView(this);
    };
    PolarLineSeriesBase.prototype.kk = function (a) {
        _super.prototype.kk.call(this, a);
        this.sy = a;
    };
    PolarLineSeriesBase.prototype.sz = function () {
        return 1;
    };
    PolarLineSeriesBase.prototype.get_s2 = function () {
        return false;
    };
    Object.defineProperty(PolarLineSeriesBase.prototype, "s2", {
        get: function () {
            return this.get_s2();
        },
        enumerable: true,
        configurable: true
    });
    PolarLineSeriesBase.prototype.get_s4 = function () {
        return false;
    };
    Object.defineProperty(PolarLineSeriesBase.prototype, "s4", {
        get: function () {
            return this.get_s4();
        },
        enumerable: true,
        configurable: true
    });
    PolarLineSeriesBase.prototype.rz = function (a, b) {
        var _this = this;
        _super.prototype.rz.call(this, a, b);
        a.m.clear();
        var c = b.bv;
        var d = b.bu;
        var e = this.qk != null ? this.qk.count : 0;
        var f = this.ql != null ? this.ql.count : 0;
        var g = Math.min(e, f);
        var h = ((function () {
            var $ret = new PolarLinePlanner();
            $ret.m = function (i) { return _this.p3.a.getScaledAngle1(_this.qk.item(i), _this.p3.e, _this.p3.d); };
            $ret.q = g;
            $ret.n = function (i) { return _this.p1.lz(_this.ql.item(i), _this.p3.g, _this.p3.f, _this.p3.i, _this.p3.h); };
            $ret.l = _this.fq;
            $ret.f = _this.qz;
            $ret.b = _this.sz();
            $ret.o = function (i) { return _this.s5(a, i); };
            $ret.p = function (i) { return _this.s6(a, i); };
            $ret.ab = d;
            $ret.ac = c;
            $ret.d = _this.s4;
            $ret.c = _this.s2;
            return $ret;
        })());
        var i = new List$1(Number_$type, 0);
        for (var j = 0; j < g; j++) {
            if (this.s3(j)) {
                i.add(j);
            }
        }
        if (this.s4 && i.count > 0) {
            i.add(i._inner[0]);
        }
        h.x(a.m, i);
    };
    PolarLineSeriesBase.prototype.s5 = function (a, b) {
        return a.w._inner[b].x;
    };
    PolarLineSeriesBase.prototype.s6 = function (a, b) {
        return a.w._inner[b].y;
    };
    PolarLineSeriesBase.prototype.s1 = function () {
        return !this.s0();
    };
    PolarLineSeriesBase.prototype.s0 = function () {
        var a = this.b6.os;
        return !a.containsPoint({ $type: Point_$type, x: 0.5, y: 0.5 });
    };
    PolarLineSeriesBase.prototype.s3 = function (a) {
        return (this.qk.item(a) >= this.p3.a.kd && this.qk.item(a) <= this.p3.a.kc && this.ql.item(a) >= this.p3.b.kd && this.ql.item(a) <= this.p3.b.kc) || (isNaN_(this.qk.item(a)) || isNaN_(this.ql.item(a)));
    };
    PolarLineSeriesBase.prototype.jl = function (a, b) {
        _super.prototype.jl.call(this, a, b);
        this.s7(b);
    };
    PolarLineSeriesBase.prototype.r3 = function (a, b) {
        _super.prototype.r3.call(this, a, b);
        if (this.qz) {
            this.sw = this.sv;
        }
        else {
            this.sw = this.sx;
        }
        this.sw.b = this.sz();
        this.s7(b);
        this.s8(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.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.ni = a;
        this.e.fs = 3;
        this.e.ft = 1;
        this.e.fu = 4;
        this.e.ea = false;
    };
    PolarLineSeriesBaseView.$t = markType(PolarLineSeriesBaseView, 'PolarLineSeriesBaseView', PolarBaseView.$);
    return PolarLineSeriesBaseView;
}(PolarBaseView));
export { PolarLineSeriesBaseView };
//# sourceMappingURL=PolarLineSeriesBase_combined.js.map
