/*
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.ab8 = null;
        _this.aca = null;
        _this.ab9 = null;
        _this.ab8 = new PathRenderer(1, new DefaultFlattener());
        _this.aca = new PathRenderer(0);
        return _this;
    }
    PolarLineSeriesBase.prototype.get_zl = function () {
        return true;
    };
    PolarLineSeriesBase.prototype.zq = function () {
        return true;
    };
    PolarLineSeriesBase.prototype.cq = function () {
        return new PolarLineSeriesBaseView(this);
    };
    PolarLineSeriesBase.prototype.qx = function (a) {
        _super.prototype.qx.call(this, a);
        this.acb = a;
    };
    PolarLineSeriesBase.prototype.acc = function () {
        return 1;
    };
    PolarLineSeriesBase.prototype.get_acf = function () {
        return false;
    };
    Object.defineProperty(PolarLineSeriesBase.prototype, "acf", {
        get: function () {
            return this.get_acf();
        },
        enumerable: false,
        configurable: true
    });
    PolarLineSeriesBase.prototype.get_ach = function () {
        return false;
    };
    Object.defineProperty(PolarLineSeriesBase.prototype, "ach", {
        get: function () {
            return this.get_ach();
        },
        enumerable: false,
        configurable: true
    });
    PolarLineSeriesBase.prototype.aa5 = function (a, b) {
        var _this = this;
        _super.prototype.aa5.call(this, a, b);
        a.m.clear();
        var c = b.by;
        var d = b.bx;
        var e = b.getEffectiveViewport();
        var f = this.zb != null ? this.zb.count : 0;
        var g = this.zc != null ? this.zc.count : 0;
        var h = Math.min(f, g);
        var i = ((function () {
            var $ret = new PolarLinePlanner();
            $ret.m = function (j) { return _this.yo.a.getScaledAngle1(_this.zb.item(j), _this.yo.e, _this.yo.d); };
            $ret.q = h;
            $ret.n = function (j) { return _this.ym.nw(_this.zc.item(j), _this.yo.g, _this.yo.f, _this.yo.i, _this.yo.h); };
            $ret.l = _this.ib;
            $ret.f = _this.zr;
            $ret.b = _this.acc();
            $ret.o = function (j) { return _this.aci(a, j); };
            $ret.p = function (j) { return _this.acj(a, j); };
            $ret.ad = d;
            $ret.ac = e;
            $ret.ae = c;
            $ret.d = _this.ach;
            $ret.c = _this.acf;
            return $ret;
        })());
        var j = new List$1(Number_$type, 0);
        for (var k = 0; k < h; k++) {
            if (this.acg(k)) {
                j.add(k);
            }
        }
        if (this.ach && j.count > 0) {
            j.add(j._inner[0]);
        }
        i.x(a.m, j);
    };
    PolarLineSeriesBase.prototype.aci = function (a, b) {
        return a.w._inner[b].x;
    };
    PolarLineSeriesBase.prototype.acj = function (a, b) {
        return a.w._inner[b].y;
    };
    PolarLineSeriesBase.prototype.ace = function () {
        return !this.acd();
    };
    PolarLineSeriesBase.prototype.acd = function () {
        var a = this.c9.vl;
        return !a.containsPoint({ $type: Point_$type, x: 0.5, y: 0.5 });
    };
    PolarLineSeriesBase.prototype.acg = function (a) {
        return (this.zb.item(a) >= this.yo.a.ly && this.zb.item(a) <= this.yo.a.lx && this.zc.item(a) >= this.yo.b.ly && this.zc.item(a) <= this.yo.b.lx) || (isNaN_(this.zb.item(a)) || isNaN_(this.zc.item(a)));
    };
    PolarLineSeriesBase.prototype.o3 = function (a, b) {
        _super.prototype.o3.call(this, a, b);
        this.ack(b);
    };
    PolarLineSeriesBase.prototype.aa9 = function (a, b) {
        _super.prototype.aa9.call(this, a, b);
        if (this.zr) {
            this.ab9 = this.ab8;
        }
        else {
            this.ab9 = this.aca;
        }
        this.ab9.b = this.acc();
        this.ack(b);
        this.acl(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.vv = 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 };
