/*
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.or = null;
        _this.ot = null;
        _this.os = null;
        _this.or = new PathRenderer(1, new DefaultFlattener());
        _this.ot = new PathRenderer(0);
        return _this;
    }
    PolarLineSeriesBase.prototype.bf = function () {
        return new PolarLineSeriesBaseView(this);
    };
    PolarLineSeriesBase.prototype.im = function (a) {
        _super.prototype.im.call(this, a);
        this.ou = a;
    };
    PolarLineSeriesBase.prototype.ov = function () {
        return 1;
    };
    PolarLineSeriesBase.prototype.get_oy = function () {
        return false;
    };
    Object.defineProperty(PolarLineSeriesBase.prototype, "oy", {
        get: function () {
            return this.get_oy();
        },
        enumerable: true,
        configurable: true
    });
    PolarLineSeriesBase.prototype.get_o0 = function () {
        return false;
    };
    Object.defineProperty(PolarLineSeriesBase.prototype, "o0", {
        get: function () {
            return this.get_o0();
        },
        enumerable: true,
        configurable: true
    });
    PolarLineSeriesBase.prototype.n1 = function (a, b) {
        var _this = this;
        _super.prototype.n1.call(this, a, b);
        a.m.clear();
        var c = b.bs;
        var d = b.br;
        var e = this.na != null ? this.na.count : 0;
        var f = this.nb != null ? this.nb.count : 0;
        var g = Math.min(e, f);
        var h = ((function () {
            var $ret = new PolarLinePlanner();
            $ret.m = function (i) { return _this.my.a.getScaledAngle1(_this.na.item(i), _this.my.e, _this.my.d); };
            $ret.q = g;
            $ret.n = function (i) { return _this.mw.lj(_this.nb.item(i), _this.my.g, _this.my.f, _this.my.i, _this.my.h); };
            $ret.l = _this.er;
            $ret.f = _this.ng;
            $ret.b = _this.ov();
            $ret.o = function (i) { return _this.o1(a, i); };
            $ret.p = function (i) { return _this.o2(a, i); };
            $ret.ab = d;
            $ret.ac = c;
            $ret.d = _this.o0;
            $ret.c = _this.oy;
            return $ret;
        })());
        var i = new List$1(Number_$type, 0);
        for (var j = 0; j < g; j++) {
            if (this.oz(j)) {
                i.add(j);
            }
        }
        if (this.o0 && i.count > 0) {
            i.add(i._inner[0]);
        }
        h.x(a.m, i);
    };
    PolarLineSeriesBase.prototype.o1 = function (a, b) {
        return a.w._inner[b].x;
    };
    PolarLineSeriesBase.prototype.o2 = function (a, b) {
        return a.w._inner[b].y;
    };
    PolarLineSeriesBase.prototype.ox = function () {
        return !this.ow();
    };
    PolarLineSeriesBase.prototype.ow = function () {
        var a = this.bs.mq;
        return !a.containsPoint({ $type: Point_$type, x: 0.5, y: 0.5 });
    };
    PolarLineSeriesBase.prototype.oz = function (a) {
        return (this.na.item(a) >= this.my.a.jx && this.na.item(a) <= this.my.a.jw && this.nb.item(a) >= this.my.b.jx && this.nb.item(a) <= this.my.b.jw) || (isNaN_(this.na.item(a)) || isNaN_(this.nb.item(a)));
    };
    PolarLineSeriesBase.prototype.hp = function (a, b) {
        _super.prototype.hp.call(this, a, b);
        this.o3(b);
    };
    PolarLineSeriesBase.prototype.n3 = function (a, b) {
        _super.prototype.n3.call(this, a, b);
        if (this.ng) {
            this.os = this.or;
        }
        else {
            this.os = this.ot;
        }
        this.os.b = this.ov();
        this.o3(b);
        this.o4(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.k2 = a;
        this.e.es = 3;
        this.e.et = 1;
        this.e.eu = 4;
        this.e.dt = false;
    };
    PolarLineSeriesBaseView.$t = markType(PolarLineSeriesBaseView, 'PolarLineSeriesBaseView', PolarBaseView.$);
    return PolarLineSeriesBaseView;
}(PolarBaseView));
export { PolarLineSeriesBaseView };
//# sourceMappingURL=PolarLineSeriesBase_combined.js.map