/*
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.ac8 = null;
            this.ac8 = new CategoryLineRasterizer();
            this.ab = LineSeries.$;
            this.acs = 0;
        }
        bk() {
            return new LineSeries();
        }
        get_fl() {
            return true;
        }
        ct() {
            return new LineSeriesView(this);
        }
        q7(a) {
            super.q7(a);
            this.ac9 = a;
        }
        zy() {
            return true;
        }
        get_ex() {
            return true;
        }
        preferredCategoryMode(a) {
            return this.acs;
        }
        pb(a, b) {
            super.pb(a, b);
            let c = b;
            c.du();
        }
        aax(a, b) {
            super.aax(a, b);
            let c = b.c9.d;
            let d = typeCast(LineSeriesView.$, b);
            let e = a.h;
            let f = this.getEffectiveViewport1(b);
            this.zc.a2(this, this.zw(), runOn(this, this.yw), this.z5(b), this.z6(b));
            let g = false;
            let h = this.zc.b;
            if (h != null) {
                g = true;
            }
            if (g) {
                let i = new ScalerParams(0, b.ca, b.b9, this.acp.df, f);
                this.aat(e, -1, this.valueColumn.count, this.acp, i, b.t, -1);
            }
            let j = d.d0;
            let k = d.d1;
            let l = d.dz;
            this.zc.ad(j, true, false, true, false);
            this.zc.ad(k, true, false, true, false);
            this.zc.ad(l, false, true, false, false);
            l._opacity = 0.75 * this.zc.j;
            if (b.dd(a)) {
                d.dv(e.count, e, true, this.unknownValuePlotting, this.aa5(e, e.count - 1, b.b9, b.ca), c, this.ie);
                b.dg(a);
            }
        }
        ak(a, b) {
            let c = new List$1(ChartSelection.$, 0);
            this.qa(a, c, b);
            return c.toArray();
        }
        qa(a, b, c) {
            this.aap(a, b, c, this.y3, 0);
        }
        aam(a, b, c, d, e) {
            let f = this.aan(a, b, c, d, e);
            d = f.p3;
            e = f.p4;
            return {
                p3: d,
                p4: e
            };
        }
        rg(a, b, c, d) {
            super.rg(a, b, c, d);
            switch (b) {
                case LineSeries.$$p[0]:
                    this.y9.m = this.unknownValuePlotting == 0;
                    this.ry(false);
                    this.qr();
                    break;
            }
        }
        get useHighMarkerFidelity() {
            return this.z0;
        }
    }
    LineSeries.$t = markType(LineSeries, 'LineSeries', HorizontalAnchoredCategorySeries.$, [IUnknownValuePlotting_$type]);
    LineSeries.$$p = markDep(DependencyProperty, PropertyMetadata, LineSeries, 'raisePropertyChanged', ['UnknownValuePlotting::adb', [UnknownValuePlotting_$type, enumGetBox(UnknownValuePlotting_$type, 1)]]);
    return LineSeries;
})();
/**
 * @hidden
 */
export let LineSeriesView = /*@__PURE__*/ (() => {
    class LineSeriesView extends AnchoredCategorySeriesView {
        constructor(a) {
            super(a);
            this.dt = null;
            this.d3 = new Path();
            this.d2 = new Path();
            this.d4 = new Path();
            this.dy = new Path();
            this.dx = new Path();
            this.dw = new Path();
            this.dt = a;
        }
        a4() {
            super.a4();
            if (!this.t) {
                this.dt.xk = Defaults.e;
            }
        }
        get d0() {
            return this.d3;
        }
        get d1() {
            return this.d4;
        }
        get dz() {
            return this.d2;
        }
        du() {
            this.d2.an = null;
            this.d3.an = null;
            this.d4.an = null;
            this.a2();
        }
        dv(a, b, c, d, e, f, g) {
            this.dt.ac8.a = typeCast(ISortingAxis_$type, this.db.fetchXAxis()) !== null ? true : false;
            this.dt.ac8.m(this.d3, this.d2, this.d4, a, b, c, d, e, f, g);
            this.a2();
        }
        bp() {
            super.bp();
        }
        bq() {
            super.bq();
            this.dx.an = this.d3.an;
            this.dy.an = this.d4.an;
            this.dw.an = this.d2.an;
            let a = this.b3();
            this.dx._stroke = a;
            this.dx.ad = this.f.ig + 3;
            this.dy._stroke = a;
            this.dy.ad = this.f.ig + 3;
            this.dw._fill = a;
            this.dw._opacity = 1;
        }
        bj(a, b) {
            super.bj(a, b);
            if (a.d) {
                if (b) {
                    a.t(this.dw);
                    a.t(this.dx);
                    a.t(this.dy);
                }
                else {
                    a.t(this.d2);
                    a.t(this.d3);
                    a.t(this.d4);
                }
            }
        }
        ax(a) {
            super.ax(a);
            this.f.bc.exportPathData(a, this.d3, "lowerShape", ["Lower", "Main"]);
            this.f.bc.exportPathData(a, this.d4, "upperShape", ["Upper"]);
            this.f.bc.exportPathData(a, this.d2, "translucentShape", ["Translucent"]);
        }
        an() {
            let a = new Color();
            a.colorString = "rgba(95,95,95,0.5)";
            this.f.wb = a;
            this.f.jq = 3;
            this.f.jr = 1;
            this.f.js = 4;
            this.f.hd = false;
        }
    }
    LineSeriesView.$t = markType(LineSeriesView, 'LineSeriesView', AnchoredCategorySeriesView.$);
    return LineSeriesView;
})();
