/*
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";
/**
 * @hidden
 */
var SplineSeries = /** @class */ (function (_super) {
    tslib_1.__extends(SplineSeries, _super);
    function SplineSeries() {
        var _this = _super.call(this) || this;
        _this.qk = null;
        _this.qk = new CategoryLineRasterizer();
        _this.ab = SplineSeries.$;
        return _this;
    }
    SplineSeries.prototype.bf = function () {
        return new SplineSeriesView(this);
    };
    SplineSeries.prototype.im = function (a) {
        _super.prototype.im.call(this, a);
        this.ql = a;
    };
    SplineSeries.prototype.preferredCategoryMode = function (a) {
        return 0;
    };
    SplineSeries.prototype.hp = function (a, b) {
        _super.prototype.hp.call(this, a, b);
        var c = b;
        c.c8();
    };
    SplineSeries.prototype.oh = function (a, b) {
        _super.prototype.oh.call(this, a, b);
        var c = b;
        var d = c.cn.d;
        var e = typeCast(SplineSeriesView.$, b);
        var f = a.f;
        var g = this.getEffectiveViewport1(b);
        this.m7.x(this, this.ns(), this.pr, runOn(this, this.mt), this.n0(b), this.n1(b));
        var h = false;
        var i = this.m7.c;
        if (i != null) {
            h = true;
        }
        if (h) {
            var j = new ScalerParams(0, b.bs, b.br, this.pr.b8, g);
            this.od(f, -1, this.valueColumn.count, this.pr, j, b.n);
        }
        var k = e.de;
        var l = e.df;
        var m = e.dd;
        this.m7.ae(k, true, false, true, false);
        this.m7.ae(l, true, false, true, false);
        this.m7.ae(m, false, true, false, false);
        m._opacity = 0.75 * this.m7.i;
        if (b.cr(a)) {
            e.c9(f.count, f, true, 1, this.op(f, f.count - 1, b.br, b.bs), d, this.er);
            b.cu(a);
        }
    };
    Object.defineProperty(SplineSeries.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.nv;
        },
        enumerable: true,
        configurable: true
    });
    SplineSeries.$t = markType(SplineSeries, 'SplineSeries', SplineSeriesBase.$);
    return SplineSeries;
}(SplineSeriesBase));
export { SplineSeries };
/**
 * @hidden
 */
var SplineSeriesView = /** @class */ (function (_super) {
    tslib_1.__extends(SplineSeriesView, _super);
    function SplineSeriesView(a) {
        var _this = _super.call(this, a) || this;
        _this.c7 = null;
        _this.dh = new Path();
        _this.dg = new Path();
        _this.di = new Path();
        _this.dc = new Path();
        _this.db = new Path();
        _this.da = new Path();
        _this.c7 = a;
        return _this;
    }
    Object.defineProperty(SplineSeriesView.prototype, "de", {
        get: function () {
            return this.dh;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SplineSeriesView.prototype, "df", {
        get: function () {
            return this.di;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SplineSeriesView.prototype, "dd", {
        get: function () {
            return this.dg;
        },
        enumerable: true,
        configurable: true
    });
    SplineSeriesView.prototype.c8 = function () {
        this.dg.aj = null;
        this.dh.aj = null;
        this.di.aj = null;
        this.an();
    };
    SplineSeriesView.prototype.c9 = function (a, b, c, d, e, f, g) {
        this.c7.qk.a = typeCast(ISortingAxis_$type, this.cp.fetchXAxis()) !== null ? true : false;
        this.c7.qk.m(this.dh, this.dg, this.di, a, b, c, d, e, f, g);
        this.an();
    };
    SplineSeriesView.prototype.a9 = function () {
        _super.prototype.a9.call(this);
        this.db.aj = this.dh.aj;
        this.dc.aj = this.di.aj;
        this.da.aj = this.dg.aj;
        var a = this.bl();
        this.db._stroke = a;
        this.db.ac = this.e.ev + 3;
        this.dc._stroke = a;
        this.dc.ac = this.e.ev + 3;
        this.da._fill = a;
        this.da._opacity = 1;
    };
    SplineSeriesView.prototype.a3 = function (a, b) {
        _super.prototype.a3.call(this, a, b);
        if (a.d) {
            if (b) {
                a.s(this.da);
                a.s(this.db);
                a.s(this.dc);
            }
            else {
                a.s(this.dg);
                a.s(this.dh);
                a.s(this.di);
            }
        }
    };
    SplineSeriesView.prototype.ai = function (a) {
        _super.prototype.ai.call(this, a);
        this.e.a2.exportPathData(a, this.dh, "lowerShape", ["Lower", "Main"]);
        this.e.a2.exportPathData(a, this.di, "upperShape", ["Upper"]);
        this.e.a2.exportPathData(a, this.dg, "translucentShape", ["Translucent"]);
    };
    SplineSeriesView.$t = markType(SplineSeriesView, 'SplineSeriesView', SplineSeriesBaseView.$);
    return SplineSeriesView;
}(SplineSeriesBaseView));
export { SplineSeriesView };
