/*
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-angular-core";
import { CategoryLineRasterizer } from "./CategoryLineRasterizer";
import { UnknownValuePlotting_$type } from "igniteui-angular-core";
import { DependencyProperty } from "igniteui-angular-core";
import { typeCast, runOn, enumGetBox, markType, markDep } from "igniteui-angular-core";
import { Path } from "igniteui-angular-core";
import { ScalerParams } from "./ScalerParams";
import { PropertyMetadata } from "igniteui-angular-core";
import { AnchoredCategorySeriesView } from "./AnchoredCategorySeriesView";
import { Defaults } from "./Defaults";
import { ISortingAxis_$type } from "./ISortingAxis";
import { Color } from "igniteui-angular-core";
/**
 * @hidden
 */
export let LineSeries = /*@__PURE__*/ (() => {
    class LineSeries extends HorizontalAnchoredCategorySeries {
        constructor() {
            super();
            this.vj = null;
            this.vj = new CategoryLineRasterizer();
            this.ab = LineSeries.$;
            this.u3 = 0;
        }
        get_d4() {
            return true;
        }
        by() {
            return new LineSeriesView(this);
        }
        l4(a) {
            super.l4(a);
            this.vk = a;
        }
        get_dg() {
            return true;
        }
        preferredCategoryMode(a) {
            return this.u3;
        }
        k2(a, b) {
            super.k2(a, b);
            let c = b;
            c.db();
        }
        tf(a, b) {
            super.tf(a, b);
            let c = b.cr.d;
            let d = typeCast(LineSeriesView.$, b);
            let e = a.f;
            let f = this.getEffectiveViewport1(b);
            this.r5.a2(this, this.sp(), runOn(this, this.rq), this.sx(b), this.sy(b));
            let g = false;
            let h = this.r5.b;
            if (h != null) {
                g = true;
            }
            if (g) {
                let i = new ScalerParams(0, b.bv, b.bu, this.u0.cg, f);
                this.tb(e, -1, this.valueColumn.count, this.u0, i, b.q);
            }
            let j = d.dh;
            let k = d.di;
            let l = d.dg;
            this.r5.ad(j, true, false, true, false);
            this.r5.ad(k, true, false, true, false);
            this.r5.ad(l, false, true, false, false);
            l._opacity = 0.75 * this.r5.j;
            if (b.cv(a)) {
                d.dc(e.count, e, true, this.unknownValuePlotting, this.tn(e, e.count - 1, b.bu, b.bv), c, this.fx);
                b.cy(a);
            }
        }
        l9(a, b, c, d) {
            super.l9(a, b, c, d);
            switch (b) {
                case LineSeries.$$p[0]:
                    this.r2.m = this.unknownValuePlotting == 0;
                    this.mn(false);
                    this.lu();
                    break;
            }
        }
        get useHighMarkerFidelity() {
            return this.ss;
        }
    }
    LineSeries.$t = markType(LineSeries, 'LineSeries', HorizontalAnchoredCategorySeries.$, [IUnknownValuePlotting_$type]);
    LineSeries.$$p = markDep(DependencyProperty, PropertyMetadata, LineSeries, 'raisePropertyChanged', ['UnknownValuePlotting::vm', [UnknownValuePlotting_$type, enumGetBox(UnknownValuePlotting_$type, 1)]]);
    return LineSeries;
})();
/**
 * @hidden
 */
export let LineSeriesView = /*@__PURE__*/ (() => {
    class LineSeriesView extends AnchoredCategorySeriesView {
        constructor(a) {
            super(a);
            this.da = null;
            this.dk = new Path();
            this.dj = new Path();
            this.dl = new Path();
            this.df = new Path();
            this.de = new Path();
            this.dd = new Path();
            this.da = a;
        }
        as() {
            super.as();
            if (!this.q) {
                this.da.ql = Defaults.e;
            }
        }
        get dh() {
            return this.dk;
        }
        get di() {
            return this.dl;
        }
        get dg() {
            return this.dj;
        }
        db() {
            this.dj.an = null;
            this.dk.an = null;
            this.dl.an = null;
            this.aq();
        }
        dc(a, b, c, d, e, f, g) {
            this.da.vj.a = typeCast(ISortingAxis_$type, this.ct.fetchXAxis()) !== null ? true : false;
            this.da.vj.m(this.dk, this.dj, this.dl, a, b, c, d, e, f, g);
            this.aq();
        }
        bb() {
            super.bb();
        }
        bc() {
            super.bc();
            this.de.an = this.dk.an;
            this.df.an = this.dl.an;
            this.dd.an = this.dj.an;
            let a = this.bo();
            this.de._stroke = a;
            this.de.ad = this.e.fy + 3;
            this.df._stroke = a;
            this.df.ad = this.e.fy + 3;
            this.dd._fill = a;
            this.dd._opacity = 1;
        }
        a6(a, b) {
            super.a6(a, b);
            if (a.d) {
                if (b) {
                    a.t(this.dd);
                    a.t(this.de);
                    a.t(this.df);
                }
                else {
                    a.t(this.dj);
                    a.t(this.dk);
                    a.t(this.dl);
                }
            }
        }
        al(a) {
            super.al(a);
            this.e.a9.exportPathData(a, this.dk, "lowerShape", ["Lower", "Main"]);
            this.e.a9.exportPathData(a, this.dl, "upperShape", ["Upper"]);
            this.e.a9.exportPathData(a, this.dj, "translucentShape", ["Translucent"]);
        }
        af() {
            let a = new Color();
            a.colorString = "rgba(95,95,95,0.5)";
            this.e.ph = a;
            this.e.g1 = 3;
            this.e.g2 = 1;
            this.e.g3 = 4;
            this.e.fb = false;
        }
    }
    LineSeriesView.$t = markType(LineSeriesView, 'LineSeriesView', AnchoredCategorySeriesView.$);
    return LineSeriesView;
})();
