/*
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, 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 { PropertyMetadata } from "igniteui-react-core";
import { AnchoredRadialSeriesView } from "./AnchoredRadialSeriesView";
import { Defaults } from "./Defaults";
import { Color } from "igniteui-react-core";
/**
 * @hidden
 */
export let RadialLineSeries = /*@__PURE__*/ (() => {
    class RadialLineSeries extends AnchoredRadialSeries {
        bc() {
            return new RadialLineSeries();
        }
        get_ey() {
            return true;
        }
        cd() {
            return new RadialLineSeriesView(this);
        }
        o2(a) {
            super.o2(a);
            this.yb = a;
        }
        constructor() {
            super();
            this.ab = RadialLineSeries.$;
        }
        ac() {
            super.ac();
        }
        preferredCategoryMode(a) {
            return 0;
        }
        wb() {
            return true;
        }
        nk(a, b) {
            super.nk(a, b);
            let c = b;
            c.c4();
        }
        wq(a, b) {
            super.wq(a, b);
            let c = b.by;
            let d = b.bx;
            let e = a.f;
            let f = e.count;
            let g = new List$1(Array_$type, 2, f);
            let h = 0;
            for (let i = 0; i < f; i++) {
                let j = new Array(4);
                g.add(j);
                j[0] = this.vn.d(a.f._inner[i][0], a.f._inner[i][1], c, d);
                j[1] = this.vn.e(a.f._inner[i][0], a.f._inner[i][1], c, d);
                j[2] = this.vn.d(a.f._inner[i][0], a.f._inner[i][2], c, d);
                let k = a.f._inner[i][2];
                j[3] = this.vn.e(a.f._inner[i][0], k, c, d);
                if (k > h) {
                    h = k;
                }
            }
            let l = this.getEffectiveViewport1(b);
            this.vt.a2(this, this.wa(), runOn(this, this.vh), this.wd(b), this.we(b));
            let m = false;
            let n = this.vt.b;
            if (n != null) {
                m = true;
            }
            if (m) {
                let o = new ScalerParams(0, b.by, b.bx, this.vk.ch, l);
                this.xs(e, -1, this.w4.count, this.vk, o, b.q);
            }
            let p = b;
            let q = p.dd;
            let r = p.de;
            let s = p.dc;
            this.vt.ad(q, true, false, true, false);
            this.vt.ad(r, true, false, true, false);
            this.vt.ad(s, false, true, false, false);
            s._opacity = 0.75 * this.vt.j;
            p.c5(f, g, false, this.yc, this.wx(g, f - 1, b), p.cv.b, this.hk);
        }
        pa(a, b, c, d) {
            super.pa(a, b, c, d);
            switch (b) {
                case RadialLineSeries.$$p[0]:
                    this.pr(false);
                    this.om();
                    break;
            }
        }
        get_w7() {
            return true;
        }
    }
    RadialLineSeries.$t = /*@__PURE__*/ markType(RadialLineSeries, 'RadialLineSeries', AnchoredRadialSeries.$);
    RadialLineSeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, RadialLineSeries, 'raisePropertyChanged', ['UnknownValuePlotting:yc:ye', [UnknownValuePlotting_$type, /*@__PURE__*/ enumGetBox(UnknownValuePlotting_$type, 1)]]);
    return RadialLineSeries;
})();
/**
 * @hidden
 */
export let RadialLineSeriesView = /*@__PURE__*/ (() => {
    class RadialLineSeriesView extends AnchoredRadialSeriesView {
        constructor(a) {
            super(a);
            this.c3 = null;
            this.da = new Path();
            this.c9 = new Path();
            this.db = new Path();
            this.c7 = new Path();
            this.c6 = new Path();
            this.c8 = new Path();
            this.c3 = a;
        }
        au() {
            super.au();
            if (!this.q) {
                this.b4.uc = Defaults.e;
            }
        }
        get dd() {
            return this.da;
        }
        get de() {
            return this.db;
        }
        get dc() {
            return this.c9;
        }
        c4() {
            this.da.an = null;
            this.c9.an = null;
            this.db.an = null;
            this.c7.an = null;
            this.c6.an = null;
            this.c8.an = null;
            this.as();
        }
        c5(a, b, c, d, e, f, g) {
            this.cz.wz.m(this.da, this.c9, this.db, a, b, c, d, e, f, g);
            this.as();
        }
        bd() {
            super.bd();
        }
        be() {
            super.be();
            let a = this.br();
            this.c6.an = this.c9.an;
            this.c7.an = this.da.an;
            this.c8.an = this.db.an;
            this.c7._stroke = a;
            this.c7.ad = this.e.hl + 3;
            this.c8._stroke = a;
            this.c8.ad = this.e.hl + 3;
            this.c6._fill = a;
            this.c6._opacity = 1;
        }
        a8(a, b) {
            super.a8(a, b);
            if (a.d) {
                if (b) {
                    a.t(this.c6);
                    a.t(this.c7);
                    a.t(this.c8);
                }
                else {
                    a.t(this.c9);
                    a.t(this.da);
                    a.t(this.db);
                }
            }
        }
        an(a) {
            super.an(a);
            this.e.a5.exportPathData(a, this.da, "lowerShape", ["Lower", "Main"]);
            this.e.a5.exportPathData(a, this.db, "upperShape", ["Upper"]);
            this.e.a5.exportPathData(a, this.c9, "translucentShape", ["Translucent"]);
        }
        af() {
            let a = new Color();
            a.colorString = "rgba(95,95,95,0.5)";
            this.e.s8 = a;
            this.e.is = 3;
            this.e.it = 1;
            this.e.iu = 4;
            this.e.gk = false;
        }
    }
    RadialLineSeriesView.$t = /*@__PURE__*/ markType(RadialLineSeriesView, 'RadialLineSeriesView', AnchoredRadialSeriesView.$);
    return RadialLineSeriesView;
})();
