/*
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-react-core";
import { DependencyProperty } from "igniteui-react-core";
import { Array_$type, Point_$type, runOn, enumGetBox, markType, markDep } from "igniteui-react-core";
import { List$1 } from "igniteui-react-core";
import { Path } from "igniteui-react-core";
import { ScalerParams } from "./ScalerParams";
import { ViewportUtils } from "./ViewportUtils";
import { PropertyMetadata } from "igniteui-react-core";
import { AnchoredRadialSeriesView } from "./AnchoredRadialSeriesView";
import { Defaults } from "./Defaults";
/**
 * @hidden
 */
export let RadialAreaSeries = /*@__PURE__*/ (() => {
    class RadialAreaSeries extends AnchoredRadialSeries {
        bi() {
            return new RadialAreaSeries();
        }
        get_es() {
            return true;
        }
        cq() {
            return new RadialAreaSeriesView(this);
        }
        qw(a) {
            super.qw(a);
            this.adc = a;
        }
        constructor() {
            super();
            this.ab = RadialAreaSeries.$;
        }
        preferredCategoryMode(a) {
            return 0;
        }
        o2(a, b) {
            super.o2(a, b);
            this.adc.c6();
        }
        aa1(a, b) {
            super.aa1(a, b);
            let c = b.by;
            let d = b.bx;
            let e = b.getEffectiveViewport();
            let f = b;
            if (b.o() && !c.isEmpty && !d.isEmpty && this.yq != null && this.yv != null) {
                let g = a.f;
                let h = g.count;
                let i = new List$1(Array_$type, 2, h);
                let j = 0;
                for (let k = 0; k < h; k++) {
                    let l = new Array(4);
                    i.add(l);
                    l[0] = this.yy.d(a.f._inner[k][0], a.f._inner[k][1], c, d, e);
                    l[1] = this.yy.e(a.f._inner[k][0], a.f._inner[k][1], c, d, e);
                    l[2] = this.yy.d(a.f._inner[k][0], a.f._inner[k][2], c, d, e);
                    let m = a.f._inner[k][2];
                    l[3] = this.yy.e(a.f._inner[k][0], m, c, d, e);
                    if (m > j) {
                        j = m;
                    }
                }
                let n = ViewportUtils.e(0.5, c, d, e);
                let o = ViewportUtils.i(0.5, c, d, e);
                this.adb = { $type: Point_$type, x: n, y: o };
                let p = this.getEffectiveViewport1(f);
                this.y6.a2(this, this.zn(), runOn(this, this.ye), this.zw(b), this.zx(b));
                let q = false;
                let r = this.y6.b;
                if (r != null) {
                    q = true;
                }
                if (q) {
                    let s = new ScalerParams(0, b.by, b.bx, this.yq.ch, p);
                    this.acs(g, -1, this.abw.count, this.yq, s, b.q);
                }
                let t = f.de;
                let u = f.df;
                let v = f.dc;
                let w = f.dd;
                this.y6.ad(t, true, false, true, true);
                this.y6.ad(u, true, false, true, true);
                this.y6.ad(v, false, true, false, false);
                this.y6.ad(w, false, true, false, false);
                f.c7(a.f.count, i, false, this.adc.cx.b, this.ib, runOn(this, this.act), this.add);
                v._opacity = this.y6.j * this.h7;
                w._opacity = 0.5 * this.y6.j * this.h7;
            }
        }
        q4(a, b, c, d) {
            super.q4(a, b, c, d);
            switch (b) {
                case RadialAreaSeries.$$p[0]:
                    this.rm(false);
                    this.qg();
                    break;
            }
        }
        get_ab2() {
            return true;
        }
    }
    RadialAreaSeries.$t = /*@__PURE__*/ markType(RadialAreaSeries, 'RadialAreaSeries', AnchoredRadialSeries.$);
    RadialAreaSeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, RadialAreaSeries, 'raisePropertyChanged', ['UnknownValuePlotting:add:adf', [UnknownValuePlotting_$type, /*@__PURE__*/ enumGetBox(UnknownValuePlotting_$type, 1)]]);
    return RadialAreaSeries;
})();
/**
 * @hidden
 */
export let RadialAreaSeriesView = /*@__PURE__*/ (() => {
    class RadialAreaSeriesView extends AnchoredRadialSeriesView {
        constructor(a) {
            super(a);
            this.c5 = null;
            this.dc = new Path();
            this.de = new Path();
            this.dd = new Path();
            this.df = new Path();
            this.c8 = new Path();
            this.da = new Path();
            this.c9 = new Path();
            this.db = new Path();
            this.c5 = a;
        }
        au() {
            super.au();
            if (!this.q) {
                this.c5.w1 = Defaults.e;
            }
        }
        c6() {
            this.dc.an = null;
            this.de.an = null;
            this.dd.an = null;
            this.df.an = null;
            this.c8.an = null;
            this.da.an = null;
            this.c9.an = null;
            this.db.an = null;
            this.as();
        }
        c7(a, b, c, d, e, f, g) {
            this.c1.abr.i(this.dc, this.de, this.dd, this.df, a, b, c, d, e, f, g);
            this.as();
        }
        bd() {
            super.bd();
        }
        be() {
            super.be();
            let a = this.br();
            this.da.an = this.de.an;
            this.db.an = this.df.an;
            this.c8.an = this.dc.an;
            this.c9.an = this.dd.an;
            this.da._stroke = a;
            this.da.ad = this.e.ic + 3;
            this.db._stroke = a;
            this.db.ad = this.e.ic + 3;
            this.c8._fill = a;
            this.c8._opacity = 1;
            this.c9._fill = a;
            this.c9._opacity = 1;
        }
        a8(a, b) {
            super.a8(a, b);
            if (a.d) {
                if (b) {
                    a.t(this.c8);
                    a.t(this.c9);
                    a.t(this.da);
                    a.t(this.db);
                }
                else {
                    a.t(this.dc);
                    a.t(this.dd);
                    a.t(this.de);
                    a.t(this.df);
                }
            }
        }
        an(a) {
            super.an(a);
            this.e.bb.exportPathData(a, this.de, "lowerShape", ["Lower"]);
            this.e.bb.exportPathData(a, this.df, "upperShape", ["Upper", "Main"]);
            this.e.bb.exportPathData(a, this.dd, "translucentShape", ["Translucent"]);
            this.e.bb.exportPathData(a, this.dc, "fillShape", ["Fill"]);
        }
    }
    RadialAreaSeriesView.$t = /*@__PURE__*/ markType(RadialAreaSeriesView, 'RadialAreaSeriesView', AnchoredRadialSeriesView.$);
    return RadialAreaSeriesView;
})();
