/*
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-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) {
    __extends(PolarLineSeriesBase, _super);
    function PolarLineSeriesBase() {
        var _this = _super.call(this) || this;
        _this.ab7 = null;
        _this.ab9 = null;
        _this.ab8 = null;
        _this.ab7 = new PathRenderer(1, new DefaultFlattener());
        _this.ab9 = new PathRenderer(0);
        return _this;
    }
    PolarLineSeriesBase.prototype.get_zk = function () {
        return true;
    };
    PolarLineSeriesBase.prototype.zp = function () {
        return true;
    };
    PolarLineSeriesBase.prototype.cq = function () {
        return new PolarLineSeriesBaseView(this);
    };
    PolarLineSeriesBase.prototype.qw = function (a) {
        _super.prototype.qw.call(this, a);
        this.aca = a;
    };
    PolarLineSeriesBase.prototype.acb = function () {
        return 1;
    };
    PolarLineSeriesBase.prototype.get_ace = function () {
        return false;
    };
    Object.defineProperty(PolarLineSeriesBase.prototype, "ace", {
        get: function () {
            return this.get_ace();
        },
        enumerable: false,
        configurable: true
    });
    PolarLineSeriesBase.prototype.get_acg = function () {
        return false;
    };
    Object.defineProperty(PolarLineSeriesBase.prototype, "acg", {
        get: function () {
            return this.get_acg();
        },
        enumerable: false,
        configurable: true
    });
    PolarLineSeriesBase.prototype.aa4 = function (a, b) {
        var _this = this;
        _super.prototype.aa4.call(this, a, b);
        a.m.clear();
        var c = b.by;
        var d = b.bx;
        var e = b.getEffectiveViewport();
        var f = this.za != null ? this.za.count : 0;
        var g = this.zb != null ? this.zb.count : 0;
        var h = Math.min(f, g);
        var i = ((function () {
            var $ret = new PolarLinePlanner();
            $ret.m = function (j) { return _this.yn.a.getScaledAngle1(_this.za.item(j), _this.yn.e, _this.yn.d); };
            $ret.q = h;
            $ret.n = function (j) { return _this.yl.nw(_this.zb.item(j), _this.yn.g, _this.yn.f, _this.yn.i, _this.yn.h); };
            $ret.l = _this.ib;
            $ret.f = _this.zq;
            $ret.b = _this.acb();
            $ret.o = function (j) { return _this.ach(a, j); };
            $ret.p = function (j) { return _this.aci(a, j); };
            $ret.ad = d;
            $ret.ac = e;
            $ret.ae = c;
            $ret.d = _this.acg;
            $ret.c = _this.ace;
            return $ret;
        })());
        var j = new List$1(Number_$type, 0);
        for (var k = 0; k < h; k++) {
            if (this.acf(k)) {
                j.add(k);
            }
        }
        if (this.acg && j.count > 0) {
            j.add(j._inner[0]);
        }
        i.x(a.m, j);
    };
    PolarLineSeriesBase.prototype.ach = function (a, b) {
        return a.w._inner[b].x;
    };
    PolarLineSeriesBase.prototype.aci = function (a, b) {
        return a.w._inner[b].y;
    };
    PolarLineSeriesBase.prototype.acd = function () {
        return !this.acc();
    };
    PolarLineSeriesBase.prototype.acc = function () {
        var a = this.c9.vl;
        return !a.containsPoint({ $type: Point_$type, x: 0.5, y: 0.5 });
    };
    PolarLineSeriesBase.prototype.acf = function (a) {
        return (this.za.item(a) >= this.yn.a.ly && this.za.item(a) <= this.yn.a.lx && this.zb.item(a) >= this.yn.b.ly && this.zb.item(a) <= this.yn.b.lx) || (isNaN_(this.za.item(a)) || isNaN_(this.zb.item(a)));
    };
    PolarLineSeriesBase.prototype.o2 = function (a, b) {
        _super.prototype.o2.call(this, a, b);
        this.acj(b);
    };
    PolarLineSeriesBase.prototype.aa8 = function (a, b) {
        _super.prototype.aa8.call(this, a, b);
        if (this.zq) {
            this.ab8 = this.ab7;
        }
        else {
            this.ab8 = this.ab9;
        }
        this.ab8.b = this.acb();
        this.acj(b);
        this.ack(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.c8 = null;
        _this.c8 = a;
        return _this;
    }
    PolarLineSeriesBaseView.prototype.af = function () {
        var a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.vu = a;
        this.e.jk = 3;
        this.e.jl = 1;
        this.e.jm = 4;
        this.e.ha = false;
    };
    PolarLineSeriesBaseView.$t = markType(PolarLineSeriesBaseView, 'PolarLineSeriesBaseView', PolarBaseView.$);
    return PolarLineSeriesBaseView;
}(PolarBaseView));
export { PolarLineSeriesBaseView };
