/*
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.ace = null;
        _this.acg = null;
        _this.acf = null;
        _this.ace = new PathRenderer(1, new DefaultFlattener());
        _this.acg = new PathRenderer(0);
        return _this;
    }
    PolarLineSeriesBase.prototype.get_zr = function () {
        return true;
    };
    PolarLineSeriesBase.prototype.zw = function () {
        return true;
    };
    PolarLineSeriesBase.prototype.cs = function () {
        return new PolarLineSeriesBaseView(this);
    };
    PolarLineSeriesBase.prototype.qz = function (a) {
        _super.prototype.qz.call(this, a);
        this.ach = a;
    };
    PolarLineSeriesBase.prototype.aci = function () {
        return 1;
    };
    PolarLineSeriesBase.prototype.get_acl = function () {
        return false;
    };
    Object.defineProperty(PolarLineSeriesBase.prototype, "acl", {
        get: function () {
            return this.get_acl();
        },
        enumerable: false,
        configurable: true
    });
    PolarLineSeriesBase.prototype.get_acn = function () {
        return false;
    };
    Object.defineProperty(PolarLineSeriesBase.prototype, "acn", {
        get: function () {
            return this.get_acn();
        },
        enumerable: false,
        configurable: true
    });
    PolarLineSeriesBase.prototype.abb = function (a, b) {
        var _this = this;
        _super.prototype.abb.call(this, a, b);
        a.m.clear();
        var c = b.by;
        var d = b.bx;
        var e = b.getEffectiveViewport();
        var f = this.zh != null ? this.zh.count : 0;
        var g = this.zi != null ? this.zi.count : 0;
        var h = Math.min(f, g);
        var i = ((function () {
            var $ret = new PolarLinePlanner();
            $ret.m = function (j) { return _this.yu.a.getScaledAngle1(_this.zh.item(j), _this.yu.e, _this.yu.d); };
            $ret.q = h;
            $ret.n = function (j) { return _this.ys.oe(_this.zi.item(j), _this.yu.g, _this.yu.f, _this.yu.i, _this.yu.h); };
            $ret.l = _this.id;
            $ret.f = _this.zx;
            $ret.b = _this.aci();
            $ret.o = function (j) { return _this.aco(a, j); };
            $ret.p = function (j) { return _this.acp(a, j); };
            $ret.ad = d;
            $ret.ac = e;
            $ret.ae = c;
            $ret.d = _this.acn;
            $ret.c = _this.acl;
            return $ret;
        })());
        var j = new List$1(Number_$type, 0);
        for (var k = 0; k < h; k++) {
            if (this.acm(k)) {
                j.add(k);
            }
        }
        if (this.acn && j.count > 0) {
            j.add(j._inner[0]);
        }
        i.x(a.m, j);
    };
    PolarLineSeriesBase.prototype.aco = function (a, b) {
        return a.w._inner[b].x;
    };
    PolarLineSeriesBase.prototype.acp = function (a, b) {
        return a.w._inner[b].y;
    };
    PolarLineSeriesBase.prototype.ack = function () {
        return !this.acj();
    };
    PolarLineSeriesBase.prototype.acj = function () {
        var a = this.db.v4;
        return !a.containsPoint({ $type: Point_$type, x: 0.5, y: 0.5 });
    };
    PolarLineSeriesBase.prototype.acm = function (a) {
        return (this.zh.item(a) >= this.yu.a.l4 && this.zh.item(a) <= this.yu.a.l3 && this.zi.item(a) >= this.yu.b.l4 && this.zi.item(a) <= this.yu.b.l3) || (isNaN_(this.zh.item(a)) || isNaN_(this.zi.item(a)));
    };
    PolarLineSeriesBase.prototype.o5 = function (a, b) {
        _super.prototype.o5.call(this, a, b);
        this.acq(b);
    };
    PolarLineSeriesBase.prototype.abf = function (a, b) {
        _super.prototype.abf.call(this, a, b);
        if (this.zx) {
            this.acf = this.ace;
        }
        else {
            this.acf = this.acg;
        }
        this.acf.b = this.aci();
        this.acq(b);
        this.acr(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.vz = a;
        this.e.jm = 3;
        this.e.jn = 1;
        this.e.jo = 4;
        this.e.hc = false;
    };
    PolarLineSeriesBaseView.$t = markType(PolarLineSeriesBaseView, 'PolarLineSeriesBaseView', PolarBaseView.$);
    return PolarLineSeriesBaseView;
}(PolarBaseView));
export { PolarLineSeriesBaseView };
