/*
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 { __extends } from "tslib";
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
 */
var SplineSeries = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(SplineSeries, _super);
    function SplineSeries() {
        var _this = _super.call(this) || this;
        _this.v3 = null;
        _this.v3 = new CategoryLineRasterizer();
        _this.ab = SplineSeries.$;
        return _this;
    }
    SplineSeries.prototype.get_ej = function () {
        return true;
    };
    SplineSeries.prototype.by = function () {
        return new SplineSeriesView(this);
    };
    SplineSeries.prototype.l4 = function (a) {
        _super.prototype.l4.call(this, a);
        this.v4 = a;
    };
    SplineSeries.prototype.preferredCategoryMode = function (a) {
        return 0;
    };
    SplineSeries.prototype.k2 = function (a, b) {
        _super.prototype.k2.call(this, a, b);
        var c = b;
        c.dd();
    };
    SplineSeries.prototype.tf = function (a, b) {
        _super.prototype.tf.call(this, a, b);
        var c = b;
        var d = c.cr.d;
        var e = typeCast(SplineSeriesView.$, b);
        var f = a.f;
        var g = this.getEffectiveViewport1(b);
        this.r5.a2(this, this.sp(), runOn(this, this.rq), this.sx(b), this.sy(b));
        var h = false;
        var i = this.r5.b;
        if (i != null) {
            h = true;
        }
        if (h) {
            var j = new ScalerParams(0, b.bv, b.bu, this.u0.cg, g);
            this.tb(f, -1, this.valueColumn.count, this.u0, j, b.q);
        }
        var k = e.dj;
        var l = e.dk;
        var m = e.di;
        this.r5.ad(k, true, false, true, false);
        this.r5.ad(l, true, false, true, false);
        this.r5.ad(m, false, true, false, false);
        m._opacity = 0.75 * this.r5.j;
        if (b.cv(a)) {
            e.de(f.count, f, true, 1, this.tn(f, f.count - 1, b.bu, b.bv), d, this.fx);
            b.cy(a);
        }
    };
    Object.defineProperty(SplineSeries.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.ss;
        },
        enumerable: false,
        configurable: true
    });
    SplineSeries.$t = markType(SplineSeries, 'SplineSeries', SplineSeriesBase.$);
    return SplineSeries;
}(SplineSeriesBase));
export { SplineSeries };
/**
 * @hidden
 */
var SplineSeriesView = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(SplineSeriesView, _super);
    function SplineSeriesView(a) {
        var _this = _super.call(this, a) || this;
        _this.dc = null;
        _this.dm = new Path();
        _this.dl = new Path();
        _this.dn = new Path();
        _this.dh = new Path();
        _this.dg = new Path();
        _this.df = new Path();
        _this.dc = a;
        return _this;
    }
    SplineSeriesView.prototype.as = function () {
        _super.prototype.as.call(this);
        if (!this.q) {
            this.dc.ql = Defaults.e;
        }
    };
    Object.defineProperty(SplineSeriesView.prototype, "dj", {
        get: function () {
            return this.dm;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SplineSeriesView.prototype, "dk", {
        get: function () {
            return this.dn;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SplineSeriesView.prototype, "di", {
        get: function () {
            return this.dl;
        },
        enumerable: false,
        configurable: true
    });
    SplineSeriesView.prototype.dd = function () {
        this.dl.an = null;
        this.dm.an = null;
        this.dn.an = null;
        this.aq();
    };
    SplineSeriesView.prototype.de = function (a, b, c, d, e, f, g) {
        this.dc.v3.a = typeCast(ISortingAxis_$type, this.ct.fetchXAxis()) !== null ? true : false;
        this.dc.v3.m(this.dm, this.dl, this.dn, a, b, c, d, e, f, g);
        this.aq();
    };
    SplineSeriesView.prototype.bc = function () {
        _super.prototype.bc.call(this);
        this.dg.an = this.dm.an;
        this.dh.an = this.dn.an;
        this.df.an = this.dl.an;
        var a = this.bo();
        this.dg._stroke = a;
        this.dg.ad = this.e.fy + 3;
        this.dh._stroke = a;
        this.dh.ad = this.e.fy + 3;
        this.df._fill = a;
        this.df._opacity = 1;
    };
    SplineSeriesView.prototype.a6 = function (a, b) {
        _super.prototype.a6.call(this, a, b);
        if (a.d) {
            if (b) {
                a.t(this.df);
                a.t(this.dg);
                a.t(this.dh);
            }
            else {
                a.t(this.dl);
                a.t(this.dm);
                a.t(this.dn);
            }
        }
    };
    SplineSeriesView.prototype.al = function (a) {
        _super.prototype.al.call(this, a);
        this.e.a9.exportPathData(a, this.dm, "lowerShape", ["Lower", "Main"]);
        this.e.a9.exportPathData(a, this.dn, "upperShape", ["Upper"]);
        this.e.a9.exportPathData(a, this.dl, "translucentShape", ["Translucent"]);
    };
    SplineSeriesView.$t = markType(SplineSeriesView, 'SplineSeriesView', SplineSeriesBaseView.$);
    return SplineSeriesView;
}(SplineSeriesBaseView));
export { SplineSeriesView };
