/*
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 {
        get_d4() {
            return true;
        }
        by() {
            return new RadialLineSeriesView(this);
        }
        l4(a) {
            super.l4(a);
            this.uf = a;
        }
        constructor() {
            super();
            this.ab = RadialLineSeries.$;
        }
        ac() {
            super.ac();
        }
        preferredCategoryMode(a) {
            return 0;
        }
        k2(a, b) {
            super.k2(a, b);
            let c = b;
            c.c1();
        }
        sy(a, b) {
            super.sy(a, b);
            let c = b.bv;
            let d = b.bu;
            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.r1.d(a.f._inner[i][0], a.f._inner[i][1], c, d);
                j[1] = this.r1.e(a.f._inner[i][0], a.f._inner[i][1], c, d);
                j[2] = this.r1.d(a.f._inner[i][0], a.f._inner[i][2], c, d);
                let k = a.f._inner[i][2];
                j[3] = this.r1.e(a.f._inner[i][0], k, c, d);
                if (k > h) {
                    h = k;
                }
            }
            let l = this.getEffectiveViewport1(b);
            this.r7.a2(this, this.sj(), runOn(this, this.rq), this.sl(b), this.sm(b));
            let m = false;
            let n = this.r7.b;
            if (n != null) {
                m = true;
            }
            if (m) {
                let o = new ScalerParams(0, b.bv, b.bu, this.rt.ch, l);
                this.tx(e, -1, this.tc.count, this.rt, o, b.q);
            }
            let p = b;
            let q = p.da;
            let r = p.db;
            let s = p.c9;
            this.r7.ad(q, true, false, true, false);
            this.r7.ad(r, true, false, true, false);
            this.r7.ad(s, false, true, false, false);
            s._opacity = 0.75 * this.r7.j;
            p.c2(f, g, false, this.ug, this.s5(g, f - 1, b), p.cs.b, this.fx);
        }
        l9(a, b, c, d) {
            super.l9(a, b, c, d);
            switch (b) {
                case RadialLineSeries.$$p[0]:
                    this.mn(false);
                    this.lu();
                    break;
            }
        }
        get_tf() {
            return true;
        }
    }
    RadialLineSeries.$t = /*@__PURE__*/ markType(RadialLineSeries, 'RadialLineSeries', AnchoredRadialSeries.$);
    RadialLineSeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, RadialLineSeries, 'raisePropertyChanged', ['UnknownValuePlotting:ug:ui', [UnknownValuePlotting_$type, /*@__PURE__*/ enumGetBox(UnknownValuePlotting_$type, 1)]]);
    return RadialLineSeries;
})();
/**
 * @hidden
 */
export let RadialLineSeriesView = /*@__PURE__*/ (() => {
    class RadialLineSeriesView extends AnchoredRadialSeriesView {
        constructor(a) {
            super(a);
            this.c0 = null;
            this.c7 = new Path();
            this.c6 = new Path();
            this.c8 = new Path();
            this.c4 = new Path();
            this.c3 = new Path();
            this.c5 = new Path();
            this.c0 = a;
        }
        as() {
            super.as();
            if (!this.q) {
                this.b1.ql = Defaults.e;
            }
        }
        get da() {
            return this.c7;
        }
        get db() {
            return this.c8;
        }
        get c9() {
            return this.c6;
        }
        c1() {
            this.c7.an = null;
            this.c6.an = null;
            this.c8.an = null;
            this.c4.an = null;
            this.c3.an = null;
            this.c5.an = null;
            this.aq();
        }
        c2(a, b, c, d, e, f, g) {
            this.cw.s7.m(this.c7, this.c6, this.c8, a, b, c, d, e, f, g);
            this.aq();
        }
        bb() {
            super.bb();
        }
        bc() {
            super.bc();
            let a = this.bo();
            this.c3.an = this.c6.an;
            this.c4.an = this.c7.an;
            this.c5.an = this.c8.an;
            this.c4._stroke = a;
            this.c4.ad = this.e.fy + 3;
            this.c5._stroke = a;
            this.c5.ad = this.e.fy + 3;
            this.c3._fill = a;
            this.c3._opacity = 1;
        }
        a6(a, b) {
            super.a6(a, b);
            if (a.d) {
                if (b) {
                    a.t(this.c3);
                    a.t(this.c4);
                    a.t(this.c5);
                }
                else {
                    a.t(this.c6);
                    a.t(this.c7);
                    a.t(this.c8);
                }
            }
        }
        al(a) {
            super.al(a);
            this.e.a9.exportPathData(a, this.c7, "lowerShape", ["Lower", "Main"]);
            this.e.a9.exportPathData(a, this.c8, "upperShape", ["Upper"]);
            this.e.a9.exportPathData(a, this.c6, "translucentShape", ["Translucent"]);
        }
        af() {
            let a = new Color();
            a.colorString = "rgba(95,95,95,0.5)";
            this.e.ph = a;
            this.e.g1 = 3;
            this.e.g2 = 1;
            this.e.g3 = 4;
            this.e.fb = false;
        }
    }
    RadialLineSeriesView.$t = /*@__PURE__*/ markType(RadialLineSeriesView, 'RadialLineSeriesView', AnchoredRadialSeriesView.$);
    return RadialLineSeriesView;
})();
