/*
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/ES2015/type";
import { PolarLinePlanner } from "./PolarLinePlanner";
import { List$1 } from "igniteui-angular-core/ES2015/List$1";
import { isNaN_ } from "igniteui-angular-core/ES2015/number";
import { Color } from "igniteui-angular-core/ES2015/Color";
/**
 * @hidden
 */
export class PolarLineSeriesBase extends PolarBase {
    constructor() {
        super();
        this.or = null;
        this.ot = null;
        this.os = null;
        this.or = new PathRenderer(1, new DefaultFlattener());
        this.ot = new PathRenderer(0);
    }
    bf() {
        return new PolarLineSeriesBaseView(this);
    }
    im(a) {
        super.im(a);
        this.ou = a;
    }
    ov() {
        return 1;
    }
    get_oy() {
        return false;
    }
    get oy() {
        return this.get_oy();
    }
    get_o0() {
        return false;
    }
    get o0() {
        return this.get_o0();
    }
    n1(a, b) {
        super.n1(a, b);
        a.m.clear();
        let c = b.bs;
        let d = b.br;
        let e = this.na != null ? this.na.count : 0;
        let f = this.nb != null ? this.nb.count : 0;
        let g = Math.min(e, f);
        let h = ((() => {
            let $ret = new PolarLinePlanner();
            $ret.m = (i) => this.my.a.getScaledAngle1(this.na.item(i), this.my.e, this.my.d);
            $ret.q = g;
            $ret.n = (i) => this.mw.lj(this.nb.item(i), this.my.g, this.my.f, this.my.i, this.my.h);
            $ret.l = this.er;
            $ret.f = this.ng;
            $ret.b = this.ov();
            $ret.o = (i) => this.o1(a, i);
            $ret.p = (i) => this.o2(a, i);
            $ret.ab = d;
            $ret.ac = c;
            $ret.d = this.o0;
            $ret.c = this.oy;
            return $ret;
        })());
        let i = new List$1(Number_$type, 0);
        for (let j = 0; j < g; j++) {
            if (this.oz(j)) {
                i.add(j);
            }
        }
        if (this.o0 && i.count > 0) {
            i.add(i._inner[0]);
        }
        h.x(a.m, i);
    }
    o1(a, b) {
        return a.w._inner[b].x;
    }
    o2(a, b) {
        return a.w._inner[b].y;
    }
    ox() {
        return !this.ow();
    }
    ow() {
        let a = this.bs.mq;
        return !a.containsPoint({ $type: Point_$type, x: 0.5, y: 0.5 });
    }
    oz(a) {
        return (this.na.item(a) >= this.my.a.jx && this.na.item(a) <= this.my.a.jw && this.nb.item(a) >= this.my.b.jx && this.nb.item(a) <= this.my.b.jw) || (isNaN_(this.na.item(a)) || isNaN_(this.nb.item(a)));
    }
    hp(a, b) {
        super.hp(a, b);
        this.o3(b);
    }
    n3(a, b) {
        super.n3(a, b);
        if (this.ng) {
            this.os = this.or;
        }
        else {
            this.os = this.ot;
        }
        this.os.b = this.ov();
        this.o3(b);
        this.o4(a, b);
    }
}
PolarLineSeriesBase.$t = markType(PolarLineSeriesBase, 'PolarLineSeriesBase', PolarBase.$);
/**
 * @hidden
 */
export class PolarLineSeriesBaseView extends PolarBaseView {
    constructor(a) {
        super(a);
        this.cy = null;
        this.cy = a;
    }
    ac() {
        let a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.k2 = a;
        this.e.es = 3;
        this.e.et = 1;
        this.e.eu = 4;
        this.e.dt = false;
    }
}
PolarLineSeriesBaseView.$t = markType(PolarLineSeriesBaseView, 'PolarLineSeriesBaseView', PolarBaseView.$);
//# sourceMappingURL=PolarLineSeriesBase_combined.js.map