/*
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-angular-core";
import { PolarLinePlanner } from "./PolarLinePlanner";
import { List$1 } from "igniteui-angular-core";
import { isNaN_ } from "igniteui-angular-core";
import { Color } from "igniteui-angular-core";
/**
 * @hidden
 */
export let PolarLineSeriesBase = /*@__PURE__*/ (() => {
    class PolarLineSeriesBase extends PolarBase {
        constructor() {
            super();
            this.u1 = null;
            this.u3 = null;
            this.u2 = null;
            this.u1 = new PathRenderer(1, new DefaultFlattener());
            this.u3 = new PathRenderer(0);
        }
        get_so() {
            return true;
        }
        bx() {
            return new PolarLineSeriesBaseView(this);
        }
        ly(a) {
            super.ly(a);
            this.u4 = a;
        }
        u5() {
            return 1;
        }
        get_u8() {
            return false;
        }
        get u8() {
            return this.get_u8();
        }
        get_va() {
            return false;
        }
        get va() {
            return this.get_va();
        }
        t1(a, b) {
            super.t1(a, b);
            a.m.clear();
            let c = b.bv;
            let d = b.bu;
            let e = this.se != null ? this.se.count : 0;
            let f = this.sf != null ? this.sf.count : 0;
            let g = Math.min(e, f);
            let h = ((() => {
                let $ret = new PolarLinePlanner();
                $ret.m = (i) => this.rw.a.getScaledAngle1(this.se.item(i), this.rw.e, this.rw.d);
                $ret.q = g;
                $ret.n = (i) => this.ru.nt(this.sf.item(i), this.rw.g, this.rw.f, this.rw.i, this.rw.h);
                $ret.l = this.ft;
                $ret.f = this.st;
                $ret.b = this.u5();
                $ret.o = (i) => this.vb(a, i);
                $ret.p = (i) => this.vc(a, i);
                $ret.ab = d;
                $ret.ac = c;
                $ret.d = this.va;
                $ret.c = this.u8;
                return $ret;
            })());
            let i = new List$1(Number_$type, 0);
            for (let j = 0; j < g; j++) {
                if (this.u9(j)) {
                    i.add(j);
                }
            }
            if (this.va && i.count > 0) {
                i.add(i._inner[0]);
            }
            h.x(a.m, i);
        }
        vb(a, b) {
            return a.w._inner[b].x;
        }
        vc(a, b) {
            return a.w._inner[b].y;
        }
        u7() {
            return !this.u6();
        }
        u6() {
            let a = this.cd.sf;
            return !a.containsPoint({ $type: Point_$type, x: 0.5, y: 0.5 });
        }
        u9(a) {
            return (this.se.item(a) >= this.rw.a.lv && this.se.item(a) <= this.rw.a.lu && this.sf.item(a) >= this.rw.b.lv && this.sf.item(a) <= this.rw.b.lu) || (isNaN_(this.se.item(a)) || isNaN_(this.sf.item(a)));
        }
        kx(a, b) {
            super.kx(a, b);
            this.vd(b);
        }
        t5(a, b) {
            super.t5(a, b);
            if (this.st) {
                this.u2 = this.u1;
            }
            else {
                this.u2 = this.u3;
            }
            this.u2.b = this.u5();
            this.vd(b);
            this.ve(a, b);
        }
    }
    PolarLineSeriesBase.$t = markType(PolarLineSeriesBase, 'PolarLineSeriesBase', PolarBase.$);
    return PolarLineSeriesBase;
})();
/**
 * @hidden
 */
export let PolarLineSeriesBaseView = /*@__PURE__*/ (() => {
    class PolarLineSeriesBaseView extends PolarBaseView {
        constructor(a) {
            super(a);
            this.c3 = null;
            this.c3 = a;
        }
        af() {
            let a = new Color();
            a.colorString = "rgba(95,95,95,0.5)";
            this.e.pa = a;
            this.e.gw = 3;
            this.e.gx = 1;
            this.e.gy = 4;
            this.e.e7 = false;
        }
    }
    PolarLineSeriesBaseView.$t = markType(PolarLineSeriesBaseView, 'PolarLineSeriesBaseView', PolarBaseView.$);
    return PolarLineSeriesBaseView;
})();
