/*
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_wm() {
            return true;
        }
        wr() {
            return true;
        }
        cg() {
            return new PolarLineSeriesBaseView(this);
        }
        o0(a) {
            super.o0(a);
            this.zb = a;
        }
        constructor() {
            super();
            this.y8 = null;
            this.za = null;
            this.y9 = null;
            this.y8 = new PathRenderer(1, new DefaultFlattener());
            this.za = new PathRenderer(0);
        }
        zc() {
            return 1;
        }
        get_zf() {
            return false;
        }
        get zf() {
            return this.get_zf();
        }
        get_zh() {
            return false;
        }
        get zh() {
            return this.get_zh();
        }
        x6(a, b) {
            super.x6(a, b);
            a.m.clear();
            let c = b.by;
            let d = b.bx;
            let e = this.wc != null ? this.wc.count : 0;
            let f = this.wd != null ? this.wd.count : 0;
            let g = Math.min(e, f);
            let h = ((() => {
                let $ret = new PolarLinePlanner();
                $ret.m = (i) => this.vu.a.getScaledAngle1(this.wc.item(i), this.vu.e, this.vu.d);
                $ret.q = g;
                $ret.n = (i) => this.vs.nv(this.wd.item(i), this.vu.g, this.vu.f, this.vu.i, this.vu.h);
                $ret.l = this.hj;
                $ret.f = this.ws;
                $ret.b = this.zc();
                $ret.o = (i) => this.zi(a, i);
                $ret.p = (i) => this.zj(a, i);
                $ret.ab = d;
                $ret.ac = c;
                $ret.d = this.zh;
                $ret.c = this.zf;
                return $ret;
            })());
            let i = new List$1(Number_$type, 0);
            for (let j = 0; j < g; j++) {
                if (this.zg(j)) {
                    i.add(j);
                }
            }
            if (this.zh && i.count > 0) {
                i.add(i._inner[0]);
            }
            h.x(a.m, i);
        }
        zi(a, b) {
            return a.w._inner[b].x;
        }
        zj(a, b) {
            return a.w._inner[b].y;
        }
        ze() {
            return !this.zd();
        }
        zd() {
            let a = this.cy.tn;
            return !a.containsPoint({ $type: Point_$type, x: 0.5, y: 0.5 });
        }
        zg(a) {
            return (this.wc.item(a) >= this.vu.a.lx && this.wc.item(a) <= this.vu.a.lw && this.wd.item(a) >= this.vu.b.lx && this.wd.item(a) <= this.vu.b.lw) || (isNaN_(this.wc.item(a)) || isNaN_(this.wd.item(a)));
        }
        nj(a, b) {
            super.nj(a, b);
            this.zk(b);
        }
        ya(a, b) {
            super.ya(a, b);
            if (this.ws) {
                this.y9 = this.y8;
            }
            else {
                this.y9 = this.za;
            }
            this.y9.b = this.zc();
            this.zk(b);
            this.zl(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.s6 = a;
            this.e.ir = 3;
            this.e.is = 1;
            this.e.it = 4;
            this.e.gj = false;
        }
    }
    PolarLineSeriesBaseView.$t = /*@__PURE__*/ markType(PolarLineSeriesBaseView, 'PolarLineSeriesBaseView', PolarBaseView.$);
    return PolarLineSeriesBaseView;
})();
