/*
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 * as tslib_1 from "tslib";
import { SplineSeriesBase } from "./SplineSeriesBase";
import { CategoryLineRasterizer } from "./CategoryLineRasterizer";
import { typeCast, runOn, markType } from "igniteui-react-core/ES5/type";
import { Path } from "igniteui-react-core/ES5/Path";
import { ScalerParams } from "./ScalerParams";
import { SplineSeriesBaseView } from "./SplineSeriesBaseView";
import { ISortingAxis_$type } from "./ISortingAxis";
var SplineSeries = /** @class */ (function (_super) {
    tslib_1.__extends(SplineSeries, _super);
    function SplineSeries() {
        var _this = _super.call(this) || this;
        _this.qg = null;
        _this.qg = new CategoryLineRasterizer();
        _this.ab = SplineSeries.$;
        return _this;
    }
    SplineSeries.prototype.bf = function () {
        return new SplineSeriesView(this);
    };
    SplineSeries.prototype.ii = function (a) {
        _super.prototype.ii.call(this, a);
        this.qh = a;
    };
    SplineSeries.prototype.preferredCategoryMode = function (a) {
        return 0;
    };
    SplineSeries.prototype.hl = function (a, b) {
        _super.prototype.hl.call(this, a, b);
        var c = b;
        c.c6();
    };
    SplineSeries.prototype.ob = function (a, b) {
        _super.prototype.ob.call(this, a, b);
        var c = b;
        var d = c.cl.d;
        var e = typeCast(SplineSeriesView.$, b);
        var f = a.f;
        var g = this.getEffectiveViewport1(b);
        this.m2.x(this, this.nn(), this.pn, runOn(this, this.mo), this.nv(b), this.nw(b));
        var h = false;
        var i = this.m2.c;
        if (i != null) {
            h = true;
        }
        if (h) {
            var j = new ScalerParams(0, b.bq, b.bp, this.pn.b8, g);
            this.n7(f, -1, this.valueColumn.count, this.pn, j, b.n);
        }
        var k = e.dc;
        var l = e.dd;
        var m = e.db;
        this.m2.ae(k, true, false, true, false);
        this.m2.ae(l, true, false, true, false);
        this.m2.ae(m, false, true, false, false);
        m._opacity = 0.75 * this.m2.i;
        if (b.cp(a)) {
            e.c7(f.count, f, true, 1, this.ol(f, f.count - 1, b.bp, b.bq), d, this.eo);
            b.cs(a);
        }
    };
    Object.defineProperty(SplineSeries.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.nq;
        },
        enumerable: true,
        configurable: true
    });
    SplineSeries.$t = markType(SplineSeries, 'SplineSeries', SplineSeriesBase.$);
    return SplineSeries;
}(SplineSeriesBase));
export { SplineSeries };
var SplineSeriesView = /** @class */ (function (_super) {
    tslib_1.__extends(SplineSeriesView, _super);
    function SplineSeriesView(a) {
        var _this = _super.call(this, a) || this;
        _this.c5 = null;
        _this.df = new Path();
        _this.de = new Path();
        _this.dg = new Path();
        _this.da = new Path();
        _this.c9 = new Path();
        _this.c8 = new Path();
        _this.c5 = a;
        return _this;
    }
    Object.defineProperty(SplineSeriesView.prototype, "dc", {
        get: function () {
            return this.df;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SplineSeriesView.prototype, "dd", {
        get: function () {
            return this.dg;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SplineSeriesView.prototype, "db", {
        get: function () {
            return this.de;
        },
        enumerable: true,
        configurable: true
    });
    SplineSeriesView.prototype.c6 = function () {
        this.de.aj = null;
        this.df.aj = null;
        this.dg.aj = null;
        this.an();
    };
    SplineSeriesView.prototype.c7 = function (a, b, c, d, e, f, g) {
        this.c5.qg.a = typeCast(ISortingAxis_$type, this.cn.fetchXAxis()) !== null ? true : false;
        this.c5.qg.m(this.df, this.de, this.dg, a, b, c, d, e, f, g);
        this.an();
    };
    SplineSeriesView.prototype.a9 = function () {
        _super.prototype.a9.call(this);
        this.c9.aj = this.df.aj;
        this.da.aj = this.dg.aj;
        this.c8.aj = this.de.aj;
        var a = this.bk();
        this.c9._stroke = a;
        this.c9.ac = this.e.es + 3;
        this.da._stroke = a;
        this.da.ac = this.e.es + 3;
        this.c8._fill = a;
        this.c8._opacity = 1;
    };
    SplineSeriesView.prototype.a3 = function (a, b) {
        _super.prototype.a3.call(this, a, b);
        if (a.d) {
            if (b) {
                a.s(this.c8);
                a.s(this.c9);
                a.s(this.da);
            }
            else {
                a.s(this.de);
                a.s(this.df);
                a.s(this.dg);
            }
        }
    };
    SplineSeriesView.prototype.ai = function (a) {
        _super.prototype.ai.call(this, a);
        this.e.a2.exportPathData(a, this.df, "lowerShape", ["Lower", "Main"]);
        this.e.a2.exportPathData(a, this.dg, "upperShape", ["Upper"]);
        this.e.a2.exportPathData(a, this.de, "translucentShape", ["Translucent"]);
    };
    SplineSeriesView.$t = markType(SplineSeriesView, 'SplineSeriesView', SplineSeriesBaseView.$);
    return SplineSeriesView;
}(SplineSeriesBaseView));
export { SplineSeriesView };
