/*
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 {
        get_ex() {
            return true;
        }
        cg() {
            return new LineSeriesView(this);
        }
        o0(a) {
            super.o0(a);
            this.zf = a;
        }
        wg() {
            return true;
        }
        get_d9() {
            return true;
        }
        constructor() {
            super();
            this.ze = null;
            this.ze = new CategoryLineRasterizer();
            this.ab = LineSeries.$;
            this.yy = 0;
        }
        preferredCategoryMode(a) {
            return this.yy;
        }
        nj(a, b) {
            super.nj(a, b);
            let c = b;
            c.de();
        }
        w5(a, b) {
            super.w5(a, b);
            let c = b.cu.d;
            let d = typeCast(LineSeriesView.$, b);
            let e = a.f;
            let f = this.getEffectiveViewport1(b);
            this.vu.a2(this, this.we(), runOn(this, this.vf), this.wn(b), this.wo(b));
            let g = false;
            let h = this.vu.b;
            if (h != null) {
                g = true;
            }
            if (g) {
                let i = new ScalerParams(0, b.by, b.bx, this.yv.ch, f);
                this.w1(e, -1, this.valueColumn.count, this.yv, i, b.q);
            }
            let j = d.dk;
            let k = d.dl;
            let l = d.dj;
            this.vu.ad(j, true, false, true, false);
            this.vu.ad(k, true, false, true, false);
            this.vu.ad(l, false, true, false, false);
            l._opacity = 0.75 * this.vu.j;
            if (b.cy(a)) {
                d.df(e.count, e, true, this.unknownValuePlotting, this.xd(e, e.count - 1, b.bx, b.by), c, this.hj);
                b.c1(a);
            }
        }
        o8(a, b, c, d) {
            super.o8(a, b, c, d);
            switch (b) {
                case LineSeries.$$p[0]:
                    this.vr.m = this.unknownValuePlotting == 0;
                    this.pp(false);
                    this.ol();
                    break;
            }
        }
        get useHighMarkerFidelity() {
            return this.wi;
        }
    }
    LineSeries.$t = /*@__PURE__*/ markType(LineSeries, 'LineSeries', HorizontalAnchoredCategorySeries.$, [IUnknownValuePlotting_$type]);
    LineSeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, LineSeries, 'raisePropertyChanged', ['UnknownValuePlotting::zh', [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.ua = 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.ze.a = typeCast(ISortingAxis_$type, this.cw.fetchXAxis()) !== null ? true : false;
            this.dd.ze.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.hk + 3;
            this.di._stroke = a;
            this.di.ad = this.e.hk + 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.a9.exportPathData(a, this.dn, "lowerShape", ["Lower", "Main"]);
            this.e.a9.exportPathData(a, this.dp, "upperShape", ["Upper"]);
            this.e.a9.exportPathData(a, this.dm, "translucentShape", ["Translucent"]);
        }
        af() {
            let a = new Color();
            a.colorString = "rgba(95,95,95,0.5)";
            this.e.s6 = a;
            this.e.ir = 3;
            this.e.is = 1;
            this.e.it = 4;
            this.e.gj = false;
        }
    }
    LineSeriesView.$t = /*@__PURE__*/ markType(LineSeriesView, 'LineSeriesView', AnchoredCategorySeriesView.$);
    return LineSeriesView;
})();
