/*
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-react-core";
import { Path } from "igniteui-react-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.acw = null;
        _this.acw = new CategoryLineRasterizer();
        _this.ab = SplineSeries.$;
        return _this;
    }
    SplineSeries.prototype.bi = function () {
        return new SplineSeries();
    };
    SplineSeries.prototype.get_fy = function () {
        return true;
    };
    SplineSeries.prototype.cq = function () {
        return new SplineSeriesView(this);
    };
    SplineSeries.prototype.ze = function () {
        return true;
    };
    SplineSeries.prototype.qw = function (a) {
        _super.prototype.qw.call(this, a);
        this.acx = a;
    };
    SplineSeries.prototype.preferredCategoryMode = function (a) {
        return 0;
    };
    SplineSeries.prototype.o2 = function (a, b) {
        _super.prototype.o2.call(this, a, b);
        var c = b;
        c.di();
    };
    SplineSeries.prototype.z3 = function (a, b) {
        _super.prototype.z3.call(this, a, b);
        var c = b;
        var d = c.cw.d;
        var e = typeCast(SplineSeriesView.$, b);
        var f = a.f;
        var g = this.getEffectiveViewport1(b);
        this.ys.a2(this, this.zc(), runOn(this, this.yd), this.zl(b), this.zm(b));
        var h = false;
        var i = this.ys.b;
        if (i != null) {
            h = true;
        }
        if (h) {
            var j = new ScalerParams(0, b.by, b.bx, this.abt.ch, g);
            this.zz(f, -1, this.valueColumn.count, this.abt, j, b.q, -1);
        }
        var k = e.dp;
        var l = e.dq;
        var m = e.dn;
        this.ys.ad(k, true, false, true, false);
        this.ys.ad(l, true, false, true, false);
        this.ys.ad(m, false, true, false, false);
        m._opacity = 0.75 * this.ys.j;
        if (b.c0(a)) {
            e.dj(f.count, f, true, 1, this.aab(f, f.count - 1, b.bx, b.by), d, this.ib);
            b.c3(a);
        }
    };
    Object.defineProperty(SplineSeries.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.zg;
        },
        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.dh = null;
        _this.ds = new Path();
        _this.dr = new Path();
        _this.dt = new Path();
        _this.dm = new Path();
        _this.dl = new Path();
        _this.dk = new Path();
        _this.dh = a;
        return _this;
    }
    SplineSeriesView.prototype.au = function () {
        _super.prototype.au.call(this);
        if (!this.q) {
            this.dh.w1 = Defaults.e;
        }
    };
    Object.defineProperty(SplineSeriesView.prototype, "dp", {
        get: function () {
            return this.ds;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SplineSeriesView.prototype, "dq", {
        get: function () {
            return this.dt;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SplineSeriesView.prototype, "dn", {
        get: function () {
            return this.dr;
        },
        enumerable: false,
        configurable: true
    });
    SplineSeriesView.prototype.di = function () {
        this.dr.an = null;
        this.ds.an = null;
        this.dt.an = null;
        this.as();
    };
    SplineSeriesView.prototype.dj = function (a, b, c, d, e, f, g) {
        this.dh.acw.a = typeCast(ISortingAxis_$type, this.cy.fetchXAxis()) !== null ? true : false;
        this.dh.acw.m(this.ds, this.dr, this.dt, a, b, c, d, e, f, g);
        this.as();
    };
    SplineSeriesView.prototype.be = function () {
        _super.prototype.be.call(this);
        this.dl.an = this.ds.an;
        this.dm.an = this.dt.an;
        this.dk.an = this.dr.an;
        var a = this.br();
        this.dl._stroke = a;
        this.dl.ad = this.e.ic + 3;
        this.dm._stroke = a;
        this.dm.ad = this.e.ic + 3;
        this.dk._fill = a;
        this.dk._opacity = 1;
    };
    SplineSeriesView.prototype.a8 = function (a, b) {
        _super.prototype.a8.call(this, a, b);
        if (a.d) {
            if (b) {
                a.t(this.dk);
                a.t(this.dl);
                a.t(this.dm);
            }
            else {
                a.t(this.dr);
                a.t(this.ds);
                a.t(this.dt);
            }
        }
    };
    SplineSeriesView.prototype.an = function (a) {
        _super.prototype.an.call(this, a);
        this.e.bb.exportPathData(a, this.ds, "lowerShape", ["Lower", "Main"]);
        this.e.bb.exportPathData(a, this.dt, "upperShape", ["Upper"]);
        this.e.bb.exportPathData(a, this.dr, "translucentShape", ["Translucent"]);
    };
    SplineSeriesView.$t = markType(SplineSeriesView, 'SplineSeriesView', SplineSeriesBaseView.$);
    return SplineSeriesView;
}(SplineSeriesBaseView));
export { SplineSeriesView };
