/*
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.z0 = null;
        _this.z0 = new CategoryLineRasterizer();
        _this.ab = SplineSeries.$;
        return _this;
    }
    SplineSeries.prototype.bc = function () {
        return new SplineSeries();
    };
    SplineSeries.prototype.get_fe = function () {
        return true;
    };
    SplineSeries.prototype.cd = function () {
        return new SplineSeriesView(this);
    };
    SplineSeries.prototype.wi = function () {
        return true;
    };
    SplineSeries.prototype.o2 = function (a) {
        _super.prototype.o2.call(this, a);
        this.z1 = a;
    };
    SplineSeries.prototype.preferredCategoryMode = function (a) {
        return 0;
    };
    SplineSeries.prototype.nk = function (a, b) {
        _super.prototype.nk.call(this, a, b);
        var c = b;
        c.dg();
    };
    SplineSeries.prototype.w7 = function (a, b) {
        _super.prototype.w7.call(this, a, b);
        var c = b;
        var d = c.cu.d;
        var e = typeCast(SplineSeriesView.$, b);
        var f = a.f;
        var g = this.getEffectiveViewport1(b);
        this.vw.a2(this, this.wg(), runOn(this, this.vh), this.wp(b), this.wq(b));
        var h = false;
        var i = this.vw.b;
        if (i != null) {
            h = true;
        }
        if (h) {
            var j = new ScalerParams(0, b.by, b.bx, this.yx.ch, g);
            this.w3(f, -1, this.valueColumn.count, this.yx, j, b.q);
        }
        var k = e.dm;
        var l = e.dn;
        var m = e.dl;
        this.vw.ad(k, true, false, true, false);
        this.vw.ad(l, true, false, true, false);
        this.vw.ad(m, false, true, false, false);
        m._opacity = 0.75 * this.vw.j;
        if (b.cy(a)) {
            e.dh(f.count, f, true, 1, this.xf(f, f.count - 1, b.bx, b.by), d, this.hk);
            b.c1(a);
        }
    };
    Object.defineProperty(SplineSeries.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.wk;
        },
        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.df = null;
        _this.dq = new Path();
        _this.dp = new Path();
        _this.dr = new Path();
        _this.dk = new Path();
        _this.dj = new Path();
        _this.di = new Path();
        _this.df = a;
        return _this;
    }
    SplineSeriesView.prototype.au = function () {
        _super.prototype.au.call(this);
        if (!this.q) {
            this.df.uc = Defaults.e;
        }
    };
    Object.defineProperty(SplineSeriesView.prototype, "dm", {
        get: function () {
            return this.dq;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SplineSeriesView.prototype, "dn", {
        get: function () {
            return this.dr;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SplineSeriesView.prototype, "dl", {
        get: function () {
            return this.dp;
        },
        enumerable: false,
        configurable: true
    });
    SplineSeriesView.prototype.dg = function () {
        this.dp.an = null;
        this.dq.an = null;
        this.dr.an = null;
        this.as();
    };
    SplineSeriesView.prototype.dh = function (a, b, c, d, e, f, g) {
        this.df.z0.a = typeCast(ISortingAxis_$type, this.cw.fetchXAxis()) !== null ? true : false;
        this.df.z0.m(this.dq, this.dp, this.dr, a, b, c, d, e, f, g);
        this.as();
    };
    SplineSeriesView.prototype.be = function () {
        _super.prototype.be.call(this);
        this.dj.an = this.dq.an;
        this.dk.an = this.dr.an;
        this.di.an = this.dp.an;
        var a = this.br();
        this.dj._stroke = a;
        this.dj.ad = this.e.hl + 3;
        this.dk._stroke = a;
        this.dk.ad = this.e.hl + 3;
        this.di._fill = a;
        this.di._opacity = 1;
    };
    SplineSeriesView.prototype.a8 = function (a, b) {
        _super.prototype.a8.call(this, a, b);
        if (a.d) {
            if (b) {
                a.t(this.di);
                a.t(this.dj);
                a.t(this.dk);
            }
            else {
                a.t(this.dp);
                a.t(this.dq);
                a.t(this.dr);
            }
        }
    };
    SplineSeriesView.prototype.an = function (a) {
        _super.prototype.an.call(this, a);
        this.e.a5.exportPathData(a, this.dq, "lowerShape", ["Lower", "Main"]);
        this.e.a5.exportPathData(a, this.dr, "upperShape", ["Upper"]);
        this.e.a5.exportPathData(a, this.dp, "translucentShape", ["Translucent"]);
    };
    SplineSeriesView.$t = markType(SplineSeriesView, 'SplineSeriesView', SplineSeriesBaseView.$);
    return SplineSeriesView;
}(SplineSeriesBaseView));
export { SplineSeriesView };
