/*
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";
import { CategoryLineRasterizer } from "./CategoryLineRasterizer";
import { UnknownValuePlotting_$type } from "igniteui-react-core";
import { DependencyProperty } from "igniteui-react-core";
import { typeCast, runOn, enumGetBox, markType, markDep } from "igniteui-react-core";
import { Path } from "igniteui-react-core";
import { ScalerParams } from "./ScalerParams";
import { PropertyMetadata } from "igniteui-react-core";
import { AnchoredCategorySeriesView } from "./AnchoredCategorySeriesView";
import { Defaults } from "./Defaults";
import { ISortingAxis_$type } from "./ISortingAxis";
import { Color } from "igniteui-react-core";
/**
 * @hidden
 */
export let LineSeries = /*@__PURE__*/ (() => {
    class LineSeries extends HorizontalAnchoredCategorySeries {
        bc() {
            return new LineSeries();
        }
        get_ey() {
            return true;
        }
        cd() {
            return new LineSeriesView(this);
        }
        o2(a) {
            super.o2(a);
            this.zh = a;
        }
        wi() {
            return true;
        }
        get_ea() {
            return true;
        }
        constructor() {
            super();
            this.zg = null;
            this.zg = new CategoryLineRasterizer();
            this.ab = LineSeries.$;
            this.y0 = 0;
        }
        preferredCategoryMode(a) {
            return this.y0;
        }
        nk(a, b) {
            super.nk(a, b);
            let c = b;
            c.de();
        }
        w7(a, b) {
            super.w7(a, b);
            let c = b.cu.d;
            let d = typeCast(LineSeriesView.$, b);
            let e = a.f;
            let f = this.getEffectiveViewport1(b);
            this.vw.a2(this, this.wg(), runOn(this, this.vh), this.wp(b), this.wq(b));
            let g = false;
            let h = this.vw.b;
            if (h != null) {
                g = true;
            }
            if (g) {
                let i = new ScalerParams(0, b.by, b.bx, this.yx.ch, f);
                this.w3(e, -1, this.valueColumn.count, this.yx, i, b.q);
            }
            let j = d.dk;
            let k = d.dl;
            let l = d.dj;
            this.vw.ad(j, true, false, true, false);
            this.vw.ad(k, true, false, true, false);
            this.vw.ad(l, false, true, false, false);
            l._opacity = 0.75 * this.vw.j;
            if (b.cy(a)) {
                d.df(e.count, e, true, this.unknownValuePlotting, this.xf(e, e.count - 1, b.bx, b.by), c, this.hk);
                b.c1(a);
            }
        }
        pa(a, b, c, d) {
            super.pa(a, b, c, d);
            switch (b) {
                case LineSeries.$$p[0]:
                    this.vt.m = this.unknownValuePlotting == 0;
                    this.pr(false);
                    this.om();
                    break;
            }
        }
        get useHighMarkerFidelity() {
            return this.wk;
        }
    }
    LineSeries.$t = /*@__PURE__*/ markType(LineSeries, 'LineSeries', HorizontalAnchoredCategorySeries.$, [IUnknownValuePlotting_$type]);
    LineSeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, LineSeries, 'raisePropertyChanged', ['UnknownValuePlotting::zj', [UnknownValuePlotting_$type, /*@__PURE__*/ enumGetBox(UnknownValuePlotting_$type, 1)]]);
    return LineSeries;
})();
/**
 * @hidden
 */
export let LineSeriesView = /*@__PURE__*/ (() => {
    class LineSeriesView extends AnchoredCategorySeriesView {
        constructor(a) {
            super(a);
            this.dd = null;
            this.dn = new Path();
            this.dm = new Path();
            this.dp = new Path();
            this.di = new Path();
            this.dh = new Path();
            this.dg = new Path();
            this.dd = a;
        }
        au() {
            super.au();
            if (!this.q) {
                this.dd.uc = Defaults.e;
            }
        }
        get dk() {
            return this.dn;
        }
        get dl() {
            return this.dp;
        }
        get dj() {
            return this.dm;
        }
        de() {
            this.dm.an = null;
            this.dn.an = null;
            this.dp.an = null;
            this.as();
        }
        df(a, b, c, d, e, f, g) {
            this.dd.zg.a = typeCast(ISortingAxis_$type, this.cw.fetchXAxis()) !== null ? true : false;
            this.dd.zg.m(this.dn, this.dm, this.dp, a, b, c, d, e, f, g);
            this.as();
        }
        bd() {
            super.bd();
        }
        be() {
            super.be();
            this.dh.an = this.dn.an;
            this.di.an = this.dp.an;
            this.dg.an = this.dm.an;
            let a = this.br();
            this.dh._stroke = a;
            this.dh.ad = this.e.hl + 3;
            this.di._stroke = a;
            this.di.ad = this.e.hl + 3;
            this.dg._fill = a;
            this.dg._opacity = 1;
        }
        a8(a, b) {
            super.a8(a, b);
            if (a.d) {
                if (b) {
                    a.t(this.dg);
                    a.t(this.dh);
                    a.t(this.di);
                }
                else {
                    a.t(this.dm);
                    a.t(this.dn);
                    a.t(this.dp);
                }
            }
        }
        an(a) {
            super.an(a);
            this.e.a5.exportPathData(a, this.dn, "lowerShape", ["Lower", "Main"]);
            this.e.a5.exportPathData(a, this.dp, "upperShape", ["Upper"]);
            this.e.a5.exportPathData(a, this.dm, "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;
        }
    }
    LineSeriesView.$t = /*@__PURE__*/ markType(LineSeriesView, 'LineSeriesView', AnchoredCategorySeriesView.$);
    return LineSeriesView;
})();
