/*
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 { SplineSeriesBase } from "./SplineSeriesBase";
import { CategoryLineRasterizer } from "./CategoryLineRasterizer";
import { typeCast, runOn, markType } from "igniteui-angular-core";
import { Path } from "igniteui-angular-core";
import { ScalerParams } from "./ScalerParams";
import { SplineSeriesBaseView } from "./SplineSeriesBaseView";
import { Defaults } from "./Defaults";
import { ISortingAxis_$type } from "./ISortingAxis";
/**
 * @hidden
 */
export let SplineSeries = /*@__PURE__*/ (() => {
    class SplineSeries extends SplineSeriesBase {
        constructor() {
            super();
            this.ads = null;
            this.ads = new CategoryLineRasterizer();
            this.ab = SplineSeries.$;
        }
        bk() {
            return new SplineSeries();
        }
        get_f1() {
            return true;
        }
        ct() {
            return new SplineSeriesView(this);
        }
        zy() {
            return true;
        }
        q7(a) {
            super.q7(a);
            this.adt = a;
        }
        preferredCategoryMode(a) {
            return 0;
        }
        pb(a, b) {
            super.pb(a, b);
            let c = b;
            c.dw();
        }
        aax(a, b) {
            super.aax(a, b);
            let c = b;
            let d = c.c9.d;
            let e = typeCast(SplineSeriesView.$, b);
            let f = a.h;
            let g = this.getEffectiveViewport1(b);
            this.zc.a2(this, this.zw(), runOn(this, this.yw), this.z5(b), this.z6(b));
            let h = false;
            let i = this.zc.b;
            if (i != null) {
                h = true;
            }
            if (h) {
                let j = new ScalerParams(0, b.ca, b.b9, this.acp.df, g);
                this.aat(f, -1, this.valueColumn.count, this.acp, j, b.t, -1);
            }
            let k = e.d2;
            let l = e.d3;
            let m = e.d1;
            this.zc.ad(k, true, false, true, false);
            this.zc.ad(l, true, false, true, false);
            this.zc.ad(m, false, true, false, false);
            m._opacity = 0.75 * this.zc.j;
            if (b.dd(a)) {
                e.dx(f.count, f, true, 1, this.aa5(f, f.count - 1, b.b9, b.ca), d, this.ie);
                b.dg(a);
            }
        }
        get useHighMarkerFidelity() {
            return this.z0;
        }
    }
    SplineSeries.$t = markType(SplineSeries, 'SplineSeries', SplineSeriesBase.$);
    return SplineSeries;
})();
/**
 * @hidden
 */
export let SplineSeriesView = /*@__PURE__*/ (() => {
    class SplineSeriesView extends SplineSeriesBaseView {
        constructor(a) {
            super(a);
            this.dv = null;
            this.d5 = new Path();
            this.d4 = new Path();
            this.d6 = new Path();
            this.d0 = new Path();
            this.dz = new Path();
            this.dy = new Path();
            this.dv = a;
        }
        a4() {
            super.a4();
            if (!this.t) {
                this.dv.xk = Defaults.e;
            }
        }
        get d2() {
            return this.d5;
        }
        get d3() {
            return this.d6;
        }
        get d1() {
            return this.d4;
        }
        dw() {
            this.d4.an = null;
            this.d5.an = null;
            this.d6.an = null;
            this.a2();
        }
        dx(a, b, c, d, e, f, g) {
            this.dv.ads.a = typeCast(ISortingAxis_$type, this.db.fetchXAxis()) !== null ? true : false;
            this.dv.ads.m(this.d5, this.d4, this.d6, a, b, c, d, e, f, g);
            this.a2();
        }
        bq() {
            super.bq();
            this.dz.an = this.d5.an;
            this.d0.an = this.d6.an;
            this.dy.an = this.d4.an;
            let a = this.b3();
            this.dz._stroke = a;
            this.dz.ad = this.f.ig + 3;
            this.d0._stroke = a;
            this.d0.ad = this.f.ig + 3;
            this.dy._fill = a;
            this.dy._opacity = 1;
        }
        bj(a, b) {
            super.bj(a, b);
            if (a.d) {
                if (b) {
                    a.t(this.dy);
                    a.t(this.dz);
                    a.t(this.d0);
                }
                else {
                    a.t(this.d4);
                    a.t(this.d5);
                    a.t(this.d6);
                }
            }
        }
        ax(a) {
            super.ax(a);
            this.f.bc.exportPathData(a, this.d5, "lowerShape", ["Lower", "Main"]);
            this.f.bc.exportPathData(a, this.d6, "upperShape", ["Upper"]);
            this.f.bc.exportPathData(a, this.d4, "translucentShape", ["Translucent"]);
        }
    }
    SplineSeriesView.$t = markType(SplineSeriesView, 'SplineSeriesView', SplineSeriesBaseView.$);
    return SplineSeriesView;
})();
