/*
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, runOn, enumGetBox, markType, markDep } from "igniteui-angular-core";
import { List$1 } from "igniteui-angular-core";
import { Path } from "igniteui-angular-core";
import { ScalerParams } from "./ScalerParams";
import { ChartSelection } from "./ChartSelection";
import { PropertyMetadata } from "igniteui-angular-core";
import { AnchoredRadialSeriesView } from "./AnchoredRadialSeriesView";
import { Defaults } from "./Defaults";
import { Color } from "igniteui-angular-core";
/**
 * @hidden
 */
export let RadialLineSeries = /*@__PURE__*/ (() => {
    class RadialLineSeries extends AnchoredRadialSeries {
        constructor() {
            super();
            this.ab = RadialLineSeries.$;
        }
        bj() {
            return new RadialLineSeries();
        }
        get_fk() {
            return true;
        }
        cs() {
            return new RadialLineSeriesView(this);
        }
        q1(a) {
            super.q1(a);
            this.adp = a;
        }
        ac() {
            super.ac();
        }
        preferredCategoryMode(a) {
            return 0;
        }
        zy() {
            return true;
        }
        o5(a, b) {
            super.o5(a, b);
            let c = b;
            c.c6();
        }
        abc(a, b) {
            super.abc(a, b);
            let c = b.by;
            let d = b.bx;
            let e = b.getEffectiveViewport();
            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.y8.d(a.f._inner[j][0], a.f._inner[j][1], c, d, e);
                k[1] = this.y8.e(a.f._inner[j][0], a.f._inner[j][1], c, d, e);
                k[2] = this.y8.d(a.f._inner[j][0], a.f._inner[j][2], c, d, e);
                let l = a.f._inner[j][2];
                k[3] = this.y8.e(a.f._inner[j][0], l, c, d, e);
                if (l > i) {
                    i = l;
                }
            }
            let m = this.getEffectiveViewport1(b);
            this.zg.a2(this, this.zx(), runOn(this, this.yn), this.z6(b), this.z7(b));
            let n = false;
            let o = this.zg.b;
            if (o != null) {
                n = true;
            }
            if (n) {
                let p = new ScalerParams(0, b.by, b.bx, this.yz.ch, m);
                this.ac5(f, -1, this.ab8.count, this.yz, p, b.q);
            }
            let q = b;
            let r = q.df;
            let s = q.dg;
            let t = q.de;
            this.zg.ad(r, true, false, true, false);
            this.zg.ad(s, true, false, true, false);
            this.zg.ad(t, false, true, false, false);
            t._opacity = 0.75 * this.zg.j;
            q.c7(g, h, false, this.adq, this.ab1(h, g - 1, b), q.cx.b, this.id);
        }
        q9(a, b, c, d) {
            super.q9(a, b, c, d);
            switch (b) {
                case RadialLineSeries.$$p[0]:
                    this.rr(false);
                    this.ql();
                    break;
            }
        }
        get_ace() {
            return true;
        }
        ak(a, b) {
            let c = new List$1(ChartSelection.$, 0);
            this.p4(a, c, b);
            return c.toArray();
        }
        p4(a, b, c) {
            this.ac2(a, b, c, this.y0);
        }
    }
    RadialLineSeries.$t = markType(RadialLineSeries, 'RadialLineSeries', AnchoredRadialSeries.$);
    RadialLineSeries.$$p = markDep(DependencyProperty, PropertyMetadata, RadialLineSeries, 'raisePropertyChanged', ['UnknownValuePlotting:adq:ads', [UnknownValuePlotting_$type, enumGetBox(UnknownValuePlotting_$type, 1)]]);
    return RadialLineSeries;
})();
/**
 * @hidden
 */
export let RadialLineSeriesView = /*@__PURE__*/ (() => {
    class RadialLineSeriesView extends AnchoredRadialSeriesView {
        constructor(a) {
            super(a);
            this.c5 = null;
            this.dc = new Path();
            this.db = new Path();
            this.dd = new Path();
            this.c9 = new Path();
            this.c8 = new Path();
            this.da = new Path();
            this.c5 = a;
        }
        au() {
            super.au();
            if (!this.q) {
                this.b4.xa = Defaults.e;
            }
        }
        get df() {
            return this.dc;
        }
        get dg() {
            return this.dd;
        }
        get de() {
            return this.db;
        }
        c6() {
            this.dc.an = null;
            this.db.an = null;
            this.dd.an = null;
            this.c9.an = null;
            this.c8.an = null;
            this.da.an = null;
            this.as();
        }
        c7(a, b, c, d, e, f, g) {
            this.c1.ab3.m(this.dc, this.db, this.dd, a, b, c, d, e, f, g);
            this.as();
        }
        bd() {
            super.bd();
        }
        be() {
            super.be();
            let a = this.br();
            this.c8.an = this.db.an;
            this.c9.an = this.dc.an;
            this.da.an = this.dd.an;
            this.c9._stroke = a;
            this.c9.ad = this.e.ie + 3;
            this.da._stroke = a;
            this.da.ad = this.e.ie + 3;
            this.c8._fill = a;
            this.c8._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);
                }
                else {
                    a.t(this.db);
                    a.t(this.dc);
                    a.t(this.dd);
                }
            }
        }
        an(a) {
            super.an(a);
            this.e.bc.exportPathData(a, this.dc, "lowerShape", ["Lower", "Main"]);
            this.e.bc.exportPathData(a, this.dd, "upperShape", ["Upper"]);
            this.e.bc.exportPathData(a, this.db, "translucentShape", ["Translucent"]);
        }
        af() {
            let a = new Color();
            a.colorString = "rgba(95,95,95,0.5)";
            this.e.v1 = a;
            this.e.jm = 3;
            this.e.jn = 1;
            this.e.jo = 4;
            this.e.hc = false;
        }
    }
    RadialLineSeriesView.$t = markType(RadialLineSeriesView, 'RadialLineSeriesView', AnchoredRadialSeriesView.$);
    return RadialLineSeriesView;
})();
