/*
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 { 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
 */
export let PolarLineSeriesBase = /*@__PURE__*/ (() => {
    class PolarLineSeriesBase extends PolarBase {
        get_wo() {
            return true;
        }
        wt() {
            return true;
        }
        cd() {
            return new PolarLineSeriesBaseView(this);
        }
        o2(a) {
            super.o2(a);
            this.zd = a;
        }
        constructor() {
            super();
            this.za = null;
            this.zc = null;
            this.zb = null;
            this.za = new PathRenderer(1, new DefaultFlattener());
            this.zc = new PathRenderer(0);
        }
        ze() {
            return 1;
        }
        get_zh() {
            return false;
        }
        get zh() {
            return this.get_zh();
        }
        get_zj() {
            return false;
        }
        get zj() {
            return this.get_zj();
        }
        x8(a, b) {
            super.x8(a, b);
            a.m.clear();
            let c = b.by;
            let d = b.bx;
            let e = this.we != null ? this.we.count : 0;
            let f = this.wf != null ? this.wf.count : 0;
            let g = Math.min(e, f);
            let h = ((() => {
                let $ret = new PolarLinePlanner();
                $ret.m = (i) => this.vr.a.getScaledAngle1(this.we.item(i), this.vr.e, this.vr.d);
                $ret.q = g;
                $ret.n = (i) => this.vp.nv(this.wf.item(i), this.vr.g, this.vr.f, this.vr.i, this.vr.h);
                $ret.l = this.hk;
                $ret.f = this.wu;
                $ret.b = this.ze();
                $ret.o = (i) => this.zk(a, i);
                $ret.p = (i) => this.zl(a, i);
                $ret.ab = d;
                $ret.ac = c;
                $ret.d = this.zj;
                $ret.c = this.zh;
                return $ret;
            })());
            let i = new List$1(Number_$type, 0);
            for (let j = 0; j < g; j++) {
                if (this.zi(j)) {
                    i.add(j);
                }
            }
            if (this.zj && i.count > 0) {
                i.add(i._inner[0]);
            }
            h.x(a.m, i);
        }
        zk(a, b) {
            return a.w._inner[b].x;
        }
        zl(a, b) {
            return a.w._inner[b].y;
        }
        zg() {
            return !this.zf();
        }
        zf() {
            let a = this.cv.tr;
            return !a.containsPoint({ $type: Point_$type, x: 0.5, y: 0.5 });
        }
        zi(a) {
            return (this.we.item(a) >= this.vr.a.lx && this.we.item(a) <= this.vr.a.lw && this.wf.item(a) >= this.vr.b.lx && this.wf.item(a) <= this.vr.b.lw) || (isNaN_(this.we.item(a)) || isNaN_(this.wf.item(a)));
        }
        nk(a, b) {
            super.nk(a, b);
            this.zm(b);
        }
        yc(a, b) {
            super.yc(a, b);
            if (this.wu) {
                this.zb = this.za;
            }
            else {
                this.zb = this.zc;
            }
            this.zb.b = this.ze();
            this.zm(b);
            this.zn(a, b);
        }
    }
    PolarLineSeriesBase.$t = /*@__PURE__*/ markType(PolarLineSeriesBase, 'PolarLineSeriesBase', PolarBase.$);
    return PolarLineSeriesBase;
})();
/**
 * @hidden
 */
export let PolarLineSeriesBaseView = /*@__PURE__*/ (() => {
    class PolarLineSeriesBaseView extends PolarBaseView {
        constructor(a) {
            super(a);
            this.c6 = null;
            this.c6 = a;
        }
        af() {
            let a = new Color();
            a.colorString = "rgba(95,95,95,0.5)";
            this.e.s8 = a;
            this.e.is = 3;
            this.e.it = 1;
            this.e.iu = 4;
            this.e.gk = false;
        }
    }
    PolarLineSeriesBaseView.$t = /*@__PURE__*/ markType(PolarLineSeriesBaseView, 'PolarLineSeriesBaseView', PolarBaseView.$);
    return PolarLineSeriesBaseView;
})();
