/*
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 { List$1 } from "igniteui-angular-core";
import { Path } from "igniteui-angular-core";
import { ScalerParams } from "./ScalerParams";
import { ChartSelection } from "./ChartSelection";
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.acw = null;
            this.acw = new CategoryLineRasterizer();
            this.ab = LineSeries.$;
            this.acg = 0;
        }
        bj() {
            return new LineSeries();
        }
        get_fk() {
            return true;
        }
        cs() {
            return new LineSeriesView(this);
        }
        q1(a) {
            super.q1(a);
            this.acx = a;
        }
        zo() {
            return true;
        }
        get_ev() {
            return true;
        }
        preferredCategoryMode(a) {
            return this.acg;
        }
        o5(a, b) {
            super.o5(a, b);
            let c = b;
            c.dg();
        }
        aak(a, b) {
            super.aak(a, b);
            let c = b.cw.d;
            let d = typeCast(LineSeriesView.$, b);
            let e = a.f;
            let f = this.getEffectiveViewport1(b);
            this.y2.a2(this, this.zm(), runOn(this, this.ym), this.zv(b), this.zw(b));
            let g = false;
            let h = this.y2.b;
            if (h != null) {
                g = true;
            }
            if (g) {
                let i = new ScalerParams(0, b.by, b.bx, this.acd.ch, f);
                this.aag(e, -1, this.valueColumn.count, this.acd, i, b.q, -1);
            }
            let j = d.dm;
            let k = d.dn;
            let l = d.dl;
            this.y2.ad(j, true, false, true, false);
            this.y2.ad(k, true, false, true, false);
            this.y2.ad(l, false, true, false, false);
            l._opacity = 0.75 * this.y2.j;
            if (b.c0(a)) {
                d.dh(e.count, e, true, this.unknownValuePlotting, this.aat(e, e.count - 1, b.bx, b.by), c, this.id);
                b.c3(a);
            }
        }
        ak(a, b) {
            let c = new List$1(ChartSelection.$, 0);
            this.p4(a, c, b);
            return c.toArray();
        }
        p4(a, b, c) {
            this.aac(a, b, c, this.yt, 0);
        }
        q9(a, b, c, d) {
            super.q9(a, b, c, d);
            switch (b) {
                case LineSeries.$$p[0]:
                    this.yz.m = this.unknownValuePlotting == 0;
                    this.rr(false);
                    this.ql();
                    break;
            }
        }
        get useHighMarkerFidelity() {
            return this.zq;
        }
    }
    LineSeries.$t = markType(LineSeries, 'LineSeries', HorizontalAnchoredCategorySeries.$, [IUnknownValuePlotting_$type]);
    LineSeries.$$p = markDep(DependencyProperty, PropertyMetadata, LineSeries, 'raisePropertyChanged', ['UnknownValuePlotting::acz', [UnknownValuePlotting_$type, enumGetBox(UnknownValuePlotting_$type, 1)]]);
    return LineSeries;
})();
/**
 * @hidden
 */
export let LineSeriesView = /*@__PURE__*/ (() => {
    class LineSeriesView extends AnchoredCategorySeriesView {
        constructor(a) {
            super(a);
            this.df = null;
            this.dq = new Path();
            this.dp = new Path();
            this.dr = new Path();
            this.dk = new Path();
            this.dj = new Path();
            this.di = new Path();
            this.df = a;
        }
        au() {
            super.au();
            if (!this.q) {
                this.df.xa = Defaults.e;
            }
        }
        get dm() {
            return this.dq;
        }
        get dn() {
            return this.dr;
        }
        get dl() {
            return this.dp;
        }
        dg() {
            this.dp.an = null;
            this.dq.an = null;
            this.dr.an = null;
            this.as();
        }
        dh(a, b, c, d, e, f, g) {
            this.df.acw.a = typeCast(ISortingAxis_$type, this.cy.fetchXAxis()) !== null ? true : false;
            this.df.acw.m(this.dq, this.dp, this.dr, a, b, c, d, e, f, g);
            this.as();
        }
        bd() {
            super.bd();
        }
        be() {
            super.be();
            this.dj.an = this.dq.an;
            this.dk.an = this.dr.an;
            this.di.an = this.dp.an;
            let a = this.br();
            this.dj._stroke = a;
            this.dj.ad = this.e.ie + 3;
            this.dk._stroke = a;
            this.dk.ad = this.e.ie + 3;
            this.di._fill = a;
            this.di._opacity = 1;
        }
        a8(a, b) {
            super.a8(a, b);
            if (a.d) {
                if (b) {
                    a.t(this.di);
                    a.t(this.dj);
                    a.t(this.dk);
                }
                else {
                    a.t(this.dp);
                    a.t(this.dq);
                    a.t(this.dr);
                }
            }
        }
        an(a) {
            super.an(a);
            this.e.bc.exportPathData(a, this.dq, "lowerShape", ["Lower", "Main"]);
            this.e.bc.exportPathData(a, this.dr, "upperShape", ["Upper"]);
            this.e.bc.exportPathData(a, this.dp, "translucentShape", ["Translucent"]);
        }
        af() {
            let a = new Color();
            a.colorString = "rgba(95,95,95,0.5)";
            this.e.v1 = a;
            this.e.jm = 3;
            this.e.jn = 1;
            this.e.jo = 4;
            this.e.hc = false;
        }
    }
    LineSeriesView.$t = markType(LineSeriesView, 'LineSeriesView', AnchoredCategorySeriesView.$);
    return LineSeriesView;
})();
