/*
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/ES2015/UnknownValuePlotting";
import { DependencyProperty } from "igniteui-react-core/ES2015/DependencyProperty";
import { Type, Array_$type, enumGetBox, markType } from "igniteui-react-core/ES2015/type";
import { List$1 } from "igniteui-react-core/ES2015/List$1";
import { PropertyMetadata } from "igniteui-react-core/ES2015/PropertyMetadata";
import { AnchoredRadialSeriesView } from "./AnchoredRadialSeriesView";
import { Path } from "igniteui-react-core/ES2015/Path";
import { Color } from "igniteui-react-core/ES2015/Color";
/**
 * @hidden
 */
export class RadialLineSeries extends AnchoredRadialSeries {
    constructor() {
        super();
        this.ab = RadialLineSeries.$;
    }
    bf() {
        return new RadialLineSeriesView(this);
    }
    im(a) {
        super.im(a);
        this.oj = a;
    }
    ac() {
        super.ac();
    }
    preferredCategoryMode(a) {
        return 0;
    }
    hp(a, b) {
        super.hp(a, b);
        let c = b;
        c.cx();
    }
    ne(a, b) {
        super.ne(a, b);
        let c = b.bs;
        let d = b.br;
        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.mw.d(a.f._inner[i][0], a.f._inner[i][1], c, d);
            j[1] = this.mw.e(a.f._inner[i][0], a.f._inner[i][1], c, d);
            j[2] = this.mw.d(a.f._inner[i][0], a.f._inner[i][2], c, d);
            let k = a.f._inner[i][2];
            j[3] = this.mw.e(a.f._inner[i][0], k, c, d);
            if (k > h) {
                h = k;
            }
        }
        let l = b;
        l.cy(f, g, false, this.ok, this.ni(g, f - 1, b), l.co.b, this.er);
    }
    is(a, b, c, d) {
        super.is(a, b, c, d);
        switch (b) {
            case RadialLineSeries.$$p[0]:
                this.i6(false);
                this.ic();
                break;
        }
    }
    get_ns() {
        return true;
    }
}
RadialLineSeries.$t = markType(RadialLineSeries, 'RadialLineSeries', AnchoredRadialSeries.$);
Type.dep(DependencyProperty, PropertyMetadata, RadialLineSeries, 'raisePropertyChanged', ['UnknownValuePlotting:ok:om', [UnknownValuePlotting_$type, enumGetBox(UnknownValuePlotting_$type, 1)]]);
/**
 * @hidden
 */
export class RadialLineSeriesView extends AnchoredRadialSeriesView {
    constructor(a) {
        super(a);
        this.cw = null;
        this.c0 = new Path();
        this.cz = new Path();
        this.c1 = new Path();
        this.cw = a;
    }
    cx() {
        this.c0.aj = null;
        this.cz.aj = null;
        this.c1.aj = null;
        this.an();
    }
    cy(a, b, c, d, e, f, g) {
        this.cs.nk.m(this.c0, this.cz, this.c1, a, b, c, d, e, f, g);
        this.an();
    }
    a8() {
        super.a8();
        this.c0._stroke = this.e.kw;
        this.c0.ac = this.e.ev;
        this.c0.ai = this.e.k4;
        this.c0.ad = this.e.k5;
        this.c1._stroke = this.e.kw;
        this.c1.ac = this.e.ev;
        this.c1.ai = this.e.k4;
        this.c1.ad = this.e.k5;
        this.cz._fill = this.e.kw;
        this.cz._opacity = 0.75;
    }
    a9() {
        super.a9();
        let a = this.bl();
        this.c0._stroke = a;
        this.c0.ac = this.e.ev + 3;
        this.c1._stroke = a;
        this.c1.ac = this.e.ev + 3;
        this.cz._fill = a;
        this.cz._opacity = 1;
    }
    a3(a, b) {
        super.a3(a, b);
        if (a.d) {
            a.s(this.cz);
            a.s(this.c0);
            a.s(this.c1);
        }
    }
    ai(a) {
        super.ai(a);
        this.e.a2.exportPathData(a, this.c0, "lowerShape", ["Lower", "Main"]);
        this.e.a2.exportPathData(a, this.c1, "upperShape", ["Upper"]);
        this.e.a2.exportPathData(a, this.cz, "translucentShape", ["Translucent"]);
    }
    ac() {
        let a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.k3 = a;
        this.e.es = 3;
        this.e.et = 1;
        this.e.eu = 4;
        this.e.dt = false;
    }
}
RadialLineSeriesView.$t = markType(RadialLineSeriesView, 'RadialLineSeriesView', AnchoredRadialSeriesView.$);
