/*
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.ace = null;
            this.acg = null;
            this.acf = null;
            this.ace = new PathRenderer(1, new DefaultFlattener());
            this.acg = new PathRenderer(0);
        }
        get_zr() {
            return true;
        }
        zw() {
            return true;
        }
        cs() {
            return new PolarLineSeriesBaseView(this);
        }
        qz(a) {
            super.qz(a);
            this.ach = a;
        }
        aci() {
            return 1;
        }
        get_acl() {
            return false;
        }
        get acl() {
            return this.get_acl();
        }
        get_acn() {
            return false;
        }
        get acn() {
            return this.get_acn();
        }
        abb(a, b) {
            super.abb(a, b);
            a.m.clear();
            let c = b.by;
            let d = b.bx;
            let e = b.getEffectiveViewport();
            let f = this.zh != null ? this.zh.count : 0;
            let g = this.zi != null ? this.zi.count : 0;
            let h = Math.min(f, g);
            let i = ((() => {
                let $ret = new PolarLinePlanner();
                $ret.m = (j) => this.yu.a.getScaledAngle1(this.zh.item(j), this.yu.e, this.yu.d);
                $ret.q = h;
                $ret.n = (j) => this.ys.oe(this.zi.item(j), this.yu.g, this.yu.f, this.yu.i, this.yu.h);
                $ret.l = this.id;
                $ret.f = this.zx;
                $ret.b = this.aci();
                $ret.o = (j) => this.aco(a, j);
                $ret.p = (j) => this.acp(a, j);
                $ret.ad = d;
                $ret.ac = e;
                $ret.ae = c;
                $ret.d = this.acn;
                $ret.c = this.acl;
                return $ret;
            })());
            let j = new List$1(Number_$type, 0);
            for (let k = 0; k < h; k++) {
                if (this.acm(k)) {
                    j.add(k);
                }
            }
            if (this.acn && j.count > 0) {
                j.add(j._inner[0]);
            }
            i.x(a.m, j);
        }
        aco(a, b) {
            return a.w._inner[b].x;
        }
        acp(a, b) {
            return a.w._inner[b].y;
        }
        ack() {
            return !this.acj();
        }
        acj() {
            let a = this.db.v4;
            return !a.containsPoint({ $type: Point_$type, x: 0.5, y: 0.5 });
        }
        acm(a) {
            return (this.zh.item(a) >= this.yu.a.l4 && this.zh.item(a) <= this.yu.a.l3 && this.zi.item(a) >= this.yu.b.l4 && this.zi.item(a) <= this.yu.b.l3) || (isNaN_(this.zh.item(a)) || isNaN_(this.zi.item(a)));
        }
        o5(a, b) {
            super.o5(a, b);
            this.acq(b);
        }
        abf(a, b) {
            super.abf(a, b);
            if (this.zx) {
                this.acf = this.ace;
            }
            else {
                this.acf = this.acg;
            }
            this.acf.b = this.aci();
            this.acq(b);
            this.acr(a, b);
        }
    }
    PolarLineSeriesBase.$t = 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.vz = a;
            this.e.jm = 3;
            this.e.jn = 1;
            this.e.jo = 4;
            this.e.hc = false;
        }
    }
    PolarLineSeriesBaseView.$t = markType(PolarLineSeriesBaseView, 'PolarLineSeriesBaseView', PolarBaseView.$);
    return PolarLineSeriesBaseView;
})();
