/*
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_zl() {
            return true;
        }
        zq() {
            return true;
        }
        cq() {
            return new PolarLineSeriesBaseView(this);
        }
        qx(a) {
            super.qx(a);
            this.acb = a;
        }
        constructor() {
            super();
            this.ab8 = null;
            this.aca = null;
            this.ab9 = null;
            this.ab8 = new PathRenderer(1, new DefaultFlattener());
            this.aca = new PathRenderer(0);
        }
        acc() {
            return 1;
        }
        get_acf() {
            return false;
        }
        get acf() {
            return this.get_acf();
        }
        get_ach() {
            return false;
        }
        get ach() {
            return this.get_ach();
        }
        aa5(a, b) {
            super.aa5(a, b);
            a.m.clear();
            let c = b.by;
            let d = b.bx;
            let e = b.getEffectiveViewport();
            let f = this.zb != null ? this.zb.count : 0;
            let g = this.zc != null ? this.zc.count : 0;
            let h = Math.min(f, g);
            let i = ((() => {
                let $ret = new PolarLinePlanner();
                $ret.m = (j) => this.yo.a.getScaledAngle1(this.zb.item(j), this.yo.e, this.yo.d);
                $ret.q = h;
                $ret.n = (j) => this.ym.nw(this.zc.item(j), this.yo.g, this.yo.f, this.yo.i, this.yo.h);
                $ret.l = this.ib;
                $ret.f = this.zr;
                $ret.b = this.acc();
                $ret.o = (j) => this.aci(a, j);
                $ret.p = (j) => this.acj(a, j);
                $ret.ad = d;
                $ret.ac = e;
                $ret.ae = c;
                $ret.d = this.ach;
                $ret.c = this.acf;
                return $ret;
            })());
            let j = new List$1(Number_$type, 0);
            for (let k = 0; k < h; k++) {
                if (this.acg(k)) {
                    j.add(k);
                }
            }
            if (this.ach && j.count > 0) {
                j.add(j._inner[0]);
            }
            i.x(a.m, j);
        }
        aci(a, b) {
            return a.w._inner[b].x;
        }
        acj(a, b) {
            return a.w._inner[b].y;
        }
        ace() {
            return !this.acd();
        }
        acd() {
            let a = this.c9.vl;
            return !a.containsPoint({ $type: Point_$type, x: 0.5, y: 0.5 });
        }
        acg(a) {
            return (this.zb.item(a) >= this.yo.a.ly && this.zb.item(a) <= this.yo.a.lx && this.zc.item(a) >= this.yo.b.ly && this.zc.item(a) <= this.yo.b.lx) || (isNaN_(this.zb.item(a)) || isNaN_(this.zc.item(a)));
        }
        o3(a, b) {
            super.o3(a, b);
            this.ack(b);
        }
        aa9(a, b) {
            super.aa9(a, b);
            if (this.zr) {
                this.ab9 = this.ab8;
            }
            else {
                this.ab9 = this.aca;
            }
            this.ab9.b = this.acc();
            this.ack(b);
            this.acl(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.c8 = null;
            this.c8 = a;
        }
        af() {
            let a = new Color();
            a.colorString = "rgba(95,95,95,0.5)";
            this.e.vv = a;
            this.e.jk = 3;
            this.e.jl = 1;
            this.e.jm = 4;
            this.e.ha = false;
        }
    }
    PolarLineSeriesBaseView.$t = /*@__PURE__*/ markType(PolarLineSeriesBaseView, 'PolarLineSeriesBaseView', PolarBaseView.$);
    return PolarLineSeriesBaseView;
})();
