/*
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";
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 */ (function (_super) {
    tslib_1.__extends(PolarLineSeriesBase, _super);
    function PolarLineSeriesBase() {
        var _this = _super.call(this) || this;
        _this.oz = null;
        _this.o1 = null;
        _this.o0 = null;
        _this.oz = new PathRenderer(1, new DefaultFlattener());
        _this.o1 = new PathRenderer(0);
        return _this;
    }
    PolarLineSeriesBase.prototype.bf = function () {
        return new PolarLineSeriesBaseView(this);
    };
    PolarLineSeriesBase.prototype.iu = function (a) {
        _super.prototype.iu.call(this, a);
        this.o2 = a;
    };
    PolarLineSeriesBase.prototype.o3 = function () {
        return 1;
    };
    PolarLineSeriesBase.prototype.get_o6 = function () {
        return false;
    };
    Object.defineProperty(PolarLineSeriesBase.prototype, "o6", {
        get: function () {
            return this.get_o6();
        },
        enumerable: true,
        configurable: true
    });
    PolarLineSeriesBase.prototype.get_o8 = function () {
        return false;
    };
    Object.defineProperty(PolarLineSeriesBase.prototype, "o8", {
        get: function () {
            return this.get_o8();
        },
        enumerable: true,
        configurable: true
    });
    PolarLineSeriesBase.prototype.n9 = function (a, b) {
        var _this = this;
        _super.prototype.n9.call(this, a, b);
        a.m.clear();
        var c = b.bs;
        var d = b.br;
        var e = this.ni != null ? this.ni.count : 0;
        var f = this.nj != null ? this.nj.count : 0;
        var g = Math.min(e, f);
        var h = ((function () {
            var $ret = new PolarLinePlanner();
            $ret.m = function (i) { return _this.m6.a.getScaledAngle1(_this.ni.item(i), _this.m6.e, _this.m6.d); };
            $ret.q = g;
            $ret.n = function (i) { return _this.m4.lq(_this.nj.item(i), _this.m6.g, _this.m6.f, _this.m6.i, _this.m6.h); };
            $ret.l = _this.eu;
            $ret.f = _this.no;
            $ret.b = _this.o3();
            $ret.o = function (i) { return _this.o9(a, i); };
            $ret.p = function (i) { return _this.pa(a, i); };
            $ret.ab = d;
            $ret.ac = c;
            $ret.d = _this.o8;
            $ret.c = _this.o6;
            return $ret;
        })());
        var i = new List$1(Number_$type, 0);
        for (var j = 0; j < g; j++) {
            if (this.o7(j)) {
                i.add(j);
            }
        }
        if (this.o8 && i.count > 0) {
            i.add(i._inner[0]);
        }
        h.x(a.m, i);
    };
    PolarLineSeriesBase.prototype.o9 = function (a, b) {
        return a.w._inner[b].x;
    };
    PolarLineSeriesBase.prototype.pa = function (a, b) {
        return a.w._inner[b].y;
    };
    PolarLineSeriesBase.prototype.o5 = function () {
        return !this.o4();
    };
    PolarLineSeriesBase.prototype.o4 = function () {
        var a = this.bs.mq;
        return !a.containsPoint({ $type: Point_$type, x: 0.5, y: 0.5 });
    };
    PolarLineSeriesBase.prototype.o7 = function (a) {
        return (this.ni.item(a) >= this.m6.a.j4 && this.ni.item(a) <= this.m6.a.j3 && this.nj.item(a) >= this.m6.b.j4 && this.nj.item(a) <= this.m6.b.j3) || (isNaN_(this.ni.item(a)) || isNaN_(this.nj.item(a)));
    };
    PolarLineSeriesBase.prototype.hv = function (a, b) {
        _super.prototype.hv.call(this, a, b);
        this.pb(b);
    };
    PolarLineSeriesBase.prototype.ob = function (a, b) {
        _super.prototype.ob.call(this, a, b);
        if (this.no) {
            this.o0 = this.oz;
        }
        else {
            this.o0 = this.o1;
        }
        this.o0.b = this.o3();
        this.pb(b);
        this.pc(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.la = 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