/*
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 { AnchoredRadialSeries } from "./AnchoredRadialSeries";
import { UnknownValuePlotting_$type } from "igniteui-angular-core";
import { DependencyProperty } from "igniteui-angular-core";
import { Array_$type, Point_$type, runOn, enumGetBox, markType, markDep } from "igniteui-angular-core";
import { List$1 } from "igniteui-angular-core";
import { ViewportUtils } from "./ViewportUtils";
import { Path } from "igniteui-angular-core";
import { PropertyMetadata } from "igniteui-angular-core";
import { AnchoredRadialSeriesView } from "./AnchoredRadialSeriesView";
/**
 * @hidden
 */
export class RadialAreaSeries extends AnchoredRadialSeries {
    constructor() {
        super();
        this.ab = RadialAreaSeries.$;
    }
    bf() {
        return new RadialAreaSeriesView(this);
    }
    iu(a) {
        super.iu(a);
        this.oq = a;
    }
    preferredCategoryMode(a) {
        return 0;
    }
    hv(a, b) {
        super.hv(a, b);
        this.oq.cx();
    }
    nl(a, b) {
        super.nl(a, b);
        let c = b.bs;
        let d = b.br;
        let e = b;
        if (b.l() && !c.isEmpty && !d.isEmpty && this.m0 != null && this.m2 != null) {
            let f = a.f;
            let g = f.count;
            let h = new List$1(Array_$type, 2, g);
            let i = 0;
            for (let j = 0; j < g; j++) {
                let k = new Array(4);
                h.add(k);
                k[0] = this.m3.d(a.f._inner[j][0], a.f._inner[j][1], c, d);
                k[1] = this.m3.e(a.f._inner[j][0], a.f._inner[j][1], c, d);
                k[2] = this.m3.d(a.f._inner[j][0], a.f._inner[j][2], c, d);
                let l = a.f._inner[j][2];
                k[3] = this.m3.e(a.f._inner[j][0], l, c, d);
                if (l > i) {
                    i = l;
                }
            }
            let m = ViewportUtils.c(0.5, c, d);
            let n = ViewportUtils.f(0.5, c, d);
            this.op = { $type: Point_$type, x: m, y: n };
            e.cy(a.f.count, h, false, this.oq.co.b, this.eu, runOn(this, this.ob), this.or);
            e.cz._opacity = this.d6;
            e.c0._opacity = this.d6 * 0.5;
        }
    }
    iz(a, b, c, d) {
        super.iz(a, b, c, d);
        switch (b) {
            case RadialAreaSeries.$$p[0]:
                this.jd(false);
                this.ik();
                break;
        }
    }
    get_nz() {
        return true;
    }
}
RadialAreaSeries.$t = markType(RadialAreaSeries, 'RadialAreaSeries', AnchoredRadialSeries.$);
RadialAreaSeries.$$p = markDep(DependencyProperty, PropertyMetadata, RadialAreaSeries, 'raisePropertyChanged', ['UnknownValuePlotting:or:ot', [UnknownValuePlotting_$type, enumGetBox(UnknownValuePlotting_$type, 1)]]);
/**
 * @hidden
 */
export class RadialAreaSeriesView extends AnchoredRadialSeriesView {
    constructor(a) {
        super(a);
        this.cw = null;
        this.cz = new Path();
        this.c1 = new Path();
        this.c0 = new Path();
        this.c2 = new Path();
        this.cw = a;
    }
    ap() {
        super.ap();
        if (!this.n) {
            this.e.eu = 4;
            this.e.bj = 1;
        }
    }
    cx() {
        this.cz.ak = null;
        this.c1.ak = null;
        this.c0.ak = null;
        this.c2.ak = null;
        this.an();
    }
    cy(a, b, c, d, e, f, g) {
        this.cs.nr.i(this.cz, this.c1, this.c0, this.c2, a, b, c, d, e, f, g);
        this.an();
    }
    a8() {
        super.a8();
        this.cz._fill = this.e.k3;
        this.cz._opacity = this.e.d6;
        this.c0._fill = this.e.k3;
        this.c0._opacity = this.e.d6 * 0.5;
        this.c1._stroke = this.e.k4;
        this.c1.ac = this.e.ey;
        this.c1.ai = this.e.lb;
        this.c1.ad = this.e.lc;
        this.c2._stroke = this.e.k4;
        this.c2.ac = this.e.ey;
        this.c2.ai = this.e.lb;
        this.c2.ad = this.e.lc;
    }
    a9() {
        super.a9();
        let a = this.bl();
        this.c1._stroke = a;
        this.c1.ac = this.e.ey + 3;
        this.c2._stroke = a;
        this.c2.ac = this.e.ey + 3;
        this.cz._fill = a;
        this.cz._opacity = 1;
        this.c0._fill = a;
        this.c0._opacity = 1;
    }
    a3(a, b) {
        super.a3(a, b);
        if (a.d) {
            a.s(this.cz);
            a.s(this.c0);
            a.s(this.c1);
            a.s(this.c2);
        }
    }
    ai(a) {
        super.ai(a);
        this.e.a2.exportPathData(a, this.c1, "lowerShape", ["Lower"]);
        this.e.a2.exportPathData(a, this.c2, "upperShape", ["Upper", "Main"]);
        this.e.a2.exportPathData(a, this.c0, "translucentShape", ["Translucent"]);
        this.e.a2.exportPathData(a, this.cz, "fillShape", ["Fill"]);
    }
}
RadialAreaSeriesView.$t = markType(RadialAreaSeriesView, 'RadialAreaSeriesView', AnchoredRadialSeriesView.$);
//# sourceMappingURL=RadialAreaSeries_combined.js.map