/*
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 { HorizontalAnchoredCategorySeries } from "./HorizontalAnchoredCategorySeries";
import { IUnknownValuePlotting_$type } from "igniteui-react-core/ES2015/IUnknownValuePlotting";
import { CategoryLineRasterizer } from "./CategoryLineRasterizer";
import { UnknownValuePlotting_$type } from "igniteui-react-core/ES2015/UnknownValuePlotting";
import { DependencyProperty } from "igniteui-react-core/ES2015/DependencyProperty";
import { Type, typeCast, runOn, enumGetBox, markType } from "igniteui-react-core/ES2015/type";
import { Path } from "igniteui-react-core/ES2015/Path";
import { ScalerParams } from "./ScalerParams";
import { PropertyMetadata } from "igniteui-react-core/ES2015/PropertyMetadata";
import { AnchoredCategorySeriesView } from "./AnchoredCategorySeriesView";
import { ISortingAxis_$type } from "./ISortingAxis";
import { Color } from "igniteui-react-core/ES2015/Color";
export class LineSeries extends HorizontalAnchoredCategorySeries {
    constructor() {
        super();
        this.p6 = null;
        this.p6 = new CategoryLineRasterizer();
        this.ab = LineSeries.$;
        this.pq = 0;
    }
    bf() {
        return new LineSeriesView(this);
    }
    ii(a) {
        super.ii(a);
        this.p7 = a;
    }
    get_cj() {
        return true;
    }
    get cj() {
        return this.get_cj();
    }
    preferredCategoryMode(a) {
        return this.pq;
    }
    hl(a, b) {
        super.hl(a, b);
        let c = b;
        c.c5();
    }
    ob(a, b) {
        super.ob(a, b);
        let c = b.cl.d;
        let d = typeCast(LineSeriesView.$, b);
        let e = a.f;
        let f = this.getEffectiveViewport1(b);
        this.m2.x(this, this.nn(), this.pn, runOn(this, this.mo), this.nv(b), this.nw(b));
        let g = false;
        let h = this.m2.c;
        if (h != null) {
            g = true;
        }
        if (g) {
            let i = new ScalerParams(0, b.bq, b.bp, this.pn.b8, f);
            this.n7(e, -1, this.valueColumn.count, this.pn, i, b.n);
        }
        let j = d.db;
        let k = d.dc;
        let l = d.da;
        this.m2.ae(j, true, false, true, false);
        this.m2.ae(k, true, false, true, false);
        this.m2.ae(l, false, true, false, false);
        l._opacity = 0.75 * this.m2.i;
        if (b.cp(a)) {
            d.c6(e.count, e, true, this.unknownValuePlotting, this.ol(e, e.count - 1, b.bp, b.bq), c, this.eo);
            b.cs(a);
        }
    }
    io(a, b, c, d) {
        super.io(a, b, c, d);
        switch (b) {
            case LineSeries.$$p[0]:
                this.mz.m = this.unknownValuePlotting == 0;
                this.i1(false);
                this.h8();
                break;
        }
    }
    get useHighMarkerFidelity() {
        return this.nq;
    }
}
LineSeries.$t = markType(LineSeries, 'LineSeries', HorizontalAnchoredCategorySeries.$, [IUnknownValuePlotting_$type]);
Type.dep(DependencyProperty, PropertyMetadata, LineSeries, 'raisePropertyChanged', ['UnknownValuePlotting::p9', [UnknownValuePlotting_$type, enumGetBox(UnknownValuePlotting_$type, 1)]]);
export class LineSeriesView extends AnchoredCategorySeriesView {
    constructor(a) {
        super(a);
        this.c4 = null;
        this.de = new Path();
        this.dd = new Path();
        this.df = new Path();
        this.c9 = new Path();
        this.c8 = new Path();
        this.c7 = new Path();
        this.c4 = a;
    }
    get db() {
        return this.de;
    }
    get dc() {
        return this.df;
    }
    get da() {
        return this.dd;
    }
    c5() {
        this.dd.aj = null;
        this.de.aj = null;
        this.df.aj = null;
        this.an();
    }
    c6(a, b, c, d, e, f, g) {
        this.c4.p6.a = typeCast(ISortingAxis_$type, this.cn.fetchXAxis()) !== null ? true : false;
        this.c4.p6.m(this.de, this.dd, this.df, a, b, c, d, e, f, g);
        this.an();
    }
    a8() {
        super.a8();
    }
    a9() {
        super.a9();
        this.c8.aj = this.de.aj;
        this.c9.aj = this.df.aj;
        this.c7.aj = this.dd.aj;
        let a = this.bk();
        this.c8._stroke = a;
        this.c8.ac = this.e.es + 3;
        this.c9._stroke = a;
        this.c9.ac = this.e.es + 3;
        this.c7._fill = a;
        this.c7._opacity = 1;
    }
    a3(a, b) {
        super.a3(a, b);
        if (a.d) {
            if (b) {
                a.s(this.c7);
                a.s(this.c8);
                a.s(this.c9);
            }
            else {
                a.s(this.dd);
                a.s(this.de);
                a.s(this.df);
            }
        }
    }
    ai(a) {
        super.ai(a);
        this.e.a2.exportPathData(a, this.de, "lowerShape", ["Lower", "Main"]);
        this.e.a2.exportPathData(a, this.df, "upperShape", ["Upper"]);
        this.e.a2.exportPathData(a, this.dd, "translucentShape", ["Translucent"]);
    }
    ac() {
        let a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.ky = a;
        this.e.ep = 3;
        this.e.eq = 1;
        this.e.er = 4;
        this.e.dr = false;
    }
}
LineSeriesView.$t = markType(LineSeriesView, 'LineSeriesView', AnchoredCategorySeriesView.$);
/*<BeginStatics Name="Infragistics.Controls.Charts.LineSeries" />*/
/*<EndStatics Name="Infragistics.Controls.Charts.LineSeries" />*/
