/*
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.u6 = null;
            this.u8 = null;
            this.u7 = null;
            this.u6 = new PathRenderer(1, new DefaultFlattener());
            this.u8 = new PathRenderer(0);
        }
        get_st() {
            return true;
        }
        bx() {
            return new PolarLineSeriesBaseView(this);
        }
        l2(a) {
            super.l2(a);
            this.u9 = a;
        }
        va() {
            return 1;
        }
        get_vd() {
            return false;
        }
        get vd() {
            return this.get_vd();
        }
        get_vf() {
            return false;
        }
        get vf() {
            return this.get_vf();
        }
        t6(a, b) {
            super.t6(a, b);
            a.m.clear();
            let c = b.bv;
            let d = b.bu;
            let e = this.sj != null ? this.sj.count : 0;
            let f = this.sk != null ? this.sk.count : 0;
            let g = Math.min(e, f);
            let h = ((() => {
                let $ret = new PolarLinePlanner();
                $ret.m = (i) => this.r1.a.getScaledAngle1(this.sj.item(i), this.r1.e, this.r1.d);
                $ret.q = g;
                $ret.n = (i) => this.rz.nt(this.sk.item(i), this.r1.g, this.r1.f, this.r1.i, this.r1.h);
                $ret.l = this.fv;
                $ret.f = this.sy;
                $ret.b = this.va();
                $ret.o = (i) => this.vg(a, i);
                $ret.p = (i) => this.vh(a, i);
                $ret.ab = d;
                $ret.ac = c;
                $ret.d = this.vf;
                $ret.c = this.vd;
                return $ret;
            })());
            let i = new List$1(Number_$type, 0);
            for (let j = 0; j < g; j++) {
                if (this.ve(j)) {
                    i.add(j);
                }
            }
            if (this.vf && i.count > 0) {
                i.add(i._inner[0]);
            }
            h.x(a.m, i);
        }
        vg(a, b) {
            return a.w._inner[b].x;
        }
        vh(a, b) {
            return a.w._inner[b].y;
        }
        vc() {
            return !this.vb();
        }
        vb() {
            let a = this.cd.s9;
            return !a.containsPoint({ $type: Point_$type, x: 0.5, y: 0.5 });
        }
        ve(a) {
            return (this.sj.item(a) >= this.r1.a.lv && this.sj.item(a) <= this.r1.a.lu && this.sk.item(a) >= this.r1.b.lv && this.sk.item(a) <= this.r1.b.lu) || (isNaN_(this.sj.item(a)) || isNaN_(this.sk.item(a)));
        }
        k0(a, b) {
            super.k0(a, b);
            this.vi(b);
        }
        ua(a, b) {
            super.ua(a, b);
            if (this.sy) {
                this.u7 = this.u6;
            }
            else {
                this.u7 = this.u8;
            }
            this.u7.b = this.va();
            this.vi(b);
            this.vj(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.pf = a;
            this.e.gy = 3;
            this.e.gz = 1;
            this.e.g0 = 4;
            this.e.e9 = false;
        }
    }
    PolarLineSeriesBaseView.$t = markType(PolarLineSeriesBaseView, 'PolarLineSeriesBaseView', PolarBaseView.$);
    return PolarLineSeriesBaseView;
})();
