/*
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-angular-core/ES5/type";
import { PolarLinePlanner } from "./PolarLinePlanner";
import { List$1 } from "igniteui-angular-core/ES5/List$1";
import { isNaN_ } from "igniteui-angular-core/ES5/number";
import { Color } from "igniteui-angular-core/ES5/Color";
/**
 * @hidden
 */
var PolarLineSeriesBase = /** @class */ (function (_super) {
    tslib_1.__extends(PolarLineSeriesBase, _super);
    function PolarLineSeriesBase() {
        var _this = _super.call(this) || this;
        _this.oy = null;
        _this.o0 = null;
        _this.oz = null;
        _this.oy = new PathRenderer(1, new DefaultFlattener());
        _this.o0 = new PathRenderer(0);
        return _this;
    }
    PolarLineSeriesBase.prototype.bf = function () {
        return new PolarLineSeriesBaseView(this);
    };
    PolarLineSeriesBase.prototype.it = function (a) {
        _super.prototype.it.call(this, a);
        this.o1 = a;
    };
    PolarLineSeriesBase.prototype.o2 = function () {
        return 1;
    };
    PolarLineSeriesBase.prototype.get_o5 = function () {
        return false;
    };
    Object.defineProperty(PolarLineSeriesBase.prototype, "o5", {
        get: function () {
            return this.get_o5();
        },
        enumerable: true,
        configurable: true
    });
    PolarLineSeriesBase.prototype.get_o7 = function () {
        return false;
    };
    Object.defineProperty(PolarLineSeriesBase.prototype, "o7", {
        get: function () {
            return this.get_o7();
        },
        enumerable: true,
        configurable: true
    });
    PolarLineSeriesBase.prototype.n8 = function (a, b) {
        var _this = this;
        _super.prototype.n8.call(this, a, b);
        a.m.clear();
        var c = b.bs;
        var d = b.br;
        var e = this.nh != null ? this.nh.count : 0;
        var f = this.ni != null ? this.ni.count : 0;
        var g = Math.min(e, f);
        var h = ((function () {
            var $ret = new PolarLinePlanner();
            $ret.m = function (i) { return _this.m5.a.getScaledAngle1(_this.nh.item(i), _this.m5.e, _this.m5.d); };
            $ret.q = g;
            $ret.n = function (i) { return _this.m3.lp(_this.ni.item(i), _this.m5.g, _this.m5.f, _this.m5.i, _this.m5.h); };
            $ret.l = _this.eu;
            $ret.f = _this.nn;
            $ret.b = _this.o2();
            $ret.o = function (i) { return _this.o8(a, i); };
            $ret.p = function (i) { return _this.o9(a, i); };
            $ret.ab = d;
            $ret.ac = c;
            $ret.d = _this.o7;
            $ret.c = _this.o5;
            return $ret;
        })());
        var i = new List$1(Number_$type, 0);
        for (var j = 0; j < g; j++) {
            if (this.o6(j)) {
                i.add(j);
            }
        }
        if (this.o7 && i.count > 0) {
            i.add(i._inner[0]);
        }
        h.x(a.m, i);
    };
    PolarLineSeriesBase.prototype.o8 = function (a, b) {
        return a.w._inner[b].x;
    };
    PolarLineSeriesBase.prototype.o9 = function (a, b) {
        return a.w._inner[b].y;
    };
    PolarLineSeriesBase.prototype.o4 = function () {
        return !this.o3();
    };
    PolarLineSeriesBase.prototype.o3 = function () {
        var a = this.bs.mq;
        return !a.containsPoint({ $type: Point_$type, x: 0.5, y: 0.5 });
    };
    PolarLineSeriesBase.prototype.o6 = function (a) {
        return (this.nh.item(a) >= this.m5.a.j3 && this.nh.item(a) <= this.m5.a.j2 && this.ni.item(a) >= this.m5.b.j3 && this.ni.item(a) <= this.m5.b.j2) || (isNaN_(this.nh.item(a)) || isNaN_(this.ni.item(a)));
    };
    PolarLineSeriesBase.prototype.hv = function (a, b) {
        _super.prototype.hv.call(this, a, b);
        this.pa(b);
    };
    PolarLineSeriesBase.prototype.oa = function (a, b) {
        _super.prototype.oa.call(this, a, b);
        if (this.nn) {
            this.oz = this.oy;
        }
        else {
            this.oz = this.o0;
        }
        this.oz.b = this.o2();
        this.pa(b);
        this.pb(a, b);
    };
    PolarLineSeriesBase.$t = markType(PolarLineSeriesBase, 'PolarLineSeriesBase', PolarBase.$);
    return PolarLineSeriesBase;
}(PolarBase));
export { PolarLineSeriesBase };
/**
 * @hidden
 */
var PolarLineSeriesBaseView = /** @class */ (function (_super) {
    tslib_1.__extends(PolarLineSeriesBaseView, _super);
    function PolarLineSeriesBaseView(a) {
        var _this = _super.call(this, a) || this;
        _this.cy = null;
        _this.cy = a;
        return _this;
    }
    PolarLineSeriesBaseView.prototype.ac = function () {
        var a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.k9 = a;
        this.e.ev = 3;
        this.e.ew = 1;
        this.e.ex = 4;
        this.e.du = false;
    };
    PolarLineSeriesBaseView.$t = markType(PolarLineSeriesBaseView, 'PolarLineSeriesBaseView', PolarBaseView.$);
    return PolarLineSeriesBaseView;
}(PolarBaseView));
export { PolarLineSeriesBaseView };
//# sourceMappingURL=PolarLineSeriesBase_combined.js.map