/*
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_zk() {
            return true;
        }
        zp() {
            return true;
        }
        cq() {
            return new PolarLineSeriesBaseView(this);
        }
        qw(a) {
            super.qw(a);
            this.aca = a;
        }
        constructor() {
            super();
            this.ab7 = null;
            this.ab9 = null;
            this.ab8 = null;
            this.ab7 = new PathRenderer(1, new DefaultFlattener());
            this.ab9 = new PathRenderer(0);
        }
        acb() {
            return 1;
        }
        get_ace() {
            return false;
        }
        get ace() {
            return this.get_ace();
        }
        get_acg() {
            return false;
        }
        get acg() {
            return this.get_acg();
        }
        aa4(a, b) {
            super.aa4(a, b);
            a.m.clear();
            let c = b.by;
            let d = b.bx;
            let e = b.getEffectiveViewport();
            let f = this.za != null ? this.za.count : 0;
            let g = this.zb != null ? this.zb.count : 0;
            let h = Math.min(f, g);
            let i = ((() => {
                let $ret = new PolarLinePlanner();
                $ret.m = (j) => this.yn.a.getScaledAngle1(this.za.item(j), this.yn.e, this.yn.d);
                $ret.q = h;
                $ret.n = (j) => this.yl.nw(this.zb.item(j), this.yn.g, this.yn.f, this.yn.i, this.yn.h);
                $ret.l = this.ib;
                $ret.f = this.zq;
                $ret.b = this.acb();
                $ret.o = (j) => this.ach(a, j);
                $ret.p = (j) => this.aci(a, j);
                $ret.ad = d;
                $ret.ac = e;
                $ret.ae = c;
                $ret.d = this.acg;
                $ret.c = this.ace;
                return $ret;
            })());
            let j = new List$1(Number_$type, 0);
            for (let k = 0; k < h; k++) {
                if (this.acf(k)) {
                    j.add(k);
                }
            }
            if (this.acg && j.count > 0) {
                j.add(j._inner[0]);
            }
            i.x(a.m, j);
        }
        ach(a, b) {
            return a.w._inner[b].x;
        }
        aci(a, b) {
            return a.w._inner[b].y;
        }
        acd() {
            return !this.acc();
        }
        acc() {
            let a = this.c9.vl;
            return !a.containsPoint({ $type: Point_$type, x: 0.5, y: 0.5 });
        }
        acf(a) {
            return (this.za.item(a) >= this.yn.a.ly && this.za.item(a) <= this.yn.a.lx && this.zb.item(a) >= this.yn.b.ly && this.zb.item(a) <= this.yn.b.lx) || (isNaN_(this.za.item(a)) || isNaN_(this.zb.item(a)));
        }
        o2(a, b) {
            super.o2(a, b);
            this.acj(b);
        }
        aa8(a, b) {
            super.aa8(a, b);
            if (this.zq) {
                this.ab8 = this.ab7;
            }
            else {
                this.ab8 = this.ab9;
            }
            this.ab8.b = this.acb();
            this.acj(b);
            this.ack(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.vu = 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;
})();
