/*
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";
import { Path } from "igniteui-react-core";
import { ScalerParams } from "./ScalerParams";
import { SplineSeriesBaseView } from "./SplineSeriesBaseView";
import { ISortingAxis_$type } from "./ISortingAxis";
import { Color } from "igniteui-react-core";
/**
 * @hidden
 */
var SplineAreaSeries = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(SplineAreaSeries, _super);
    function SplineAreaSeries() {
        var _this = _super.call(this) || this;
        _this.tg = null;
        _this.tg = new CategoryLineRasterizer();
        _this.ab = SplineAreaSeries.$;
        return _this;
    }
    SplineAreaSeries.prototype.bp = function () {
        return new SplineAreaSeriesView(this);
    };
    SplineAreaSeries.prototype.p4 = function () {
        return 1;
    };
    SplineAreaSeries.prototype.kk = function (a) {
        _super.prototype.kk.call(this, a);
        this.th = a;
    };
    SplineAreaSeries.prototype.preferredCategoryMode = function (a) {
        return 0;
    };
    SplineAreaSeries.prototype.bv = function () {
        if (this.bw == 0) {
            return 2;
        }
        return _super.prototype.bv.call(this);
    };
    SplineAreaSeries.prototype.jl = function (a, b) {
        _super.prototype.jl.call(this, a, b);
        var c = b;
        c.dc();
    };
    SplineAreaSeries.prototype.dy = function (a, b) {
        var c = this.nt(this.nw(a), true, false);
        if (this.sx(a, c, b)) {
            return true;
        }
        if (this.dx(a, b)) {
            return true;
        }
        if (this.ol(a, b)) {
            return true;
        }
        return false;
    };
    SplineAreaSeries.prototype.rc = function (a, b) {
        var _this = this;
        _super.prototype.rc.call(this, a, b);
        var c = this.p3.cr.d;
        var d = typeCast(SplineAreaSeriesView.$, b);
        var e = a.f;
        var f = this.getEffectiveViewport1(b);
        this.p2.a0(this, this.qm(), runOn(this, this.po), this.qu(b), this.qv(b));
        var g = false;
        var h = this.p2.b;
        if (h != null) {
            g = true;
        }
        if (g) {
            var i = new ScalerParams(0, b.bv, b.bu, this.sn.ca, f);
            this.q8(e, -1, this.valueColumn.count, this.sn, i, b.q);
        }
        var j = d.dn;
        var k = d.dp;
        var l = d.dq;
        var m = d.dr;
        this.p2.ad(j, true, false, true, true);
        this.p2.ad(k, true, false, true, true);
        this.p2.ad(l, false, true, false, false);
        this.p2.ad(m, false, true, false, false);
        l._opacity = this.p2.j * this.er;
        m._opacity = 0.5 * this.p2.j * this.er;
        if (b.cv(a)) {
            d.de(a.f.count, e, true, c, this.fq, function (n, o, p, q, r) { return _this.r7(n, a.f.count, b); }, 1, a.f.count == 1 ? null : this.rl(e, e.count - 1, b.bu, b.bv, true));
            b.cy(a);
        }
        var n = this.fetchYAxis();
    };
    Object.defineProperty(SplineAreaSeries.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.qp;
        },
        enumerable: true,
        configurable: true
    });
    SplineAreaSeries.$t = markType(SplineAreaSeries, 'SplineAreaSeries', SplineSeriesBase.$);
    return SplineAreaSeries;
}(SplineSeriesBase));
export { SplineAreaSeries };
/**
 * @hidden
 */
var SplineAreaSeriesView = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(SplineAreaSeriesView, _super);
    function SplineAreaSeriesView(a) {
        var _this = _super.call(this, a) || this;
        _this.db = null;
        _this.dj = new Path();
        _this.dl = new Path();
        _this.dk = new Path();
        _this.dm = new Path();
        _this.df = new Path();
        _this.dh = new Path();
        _this.dg = new Path();
        _this.di = new Path();
        _this.db = a;
        return _this;
    }
    SplineAreaSeriesView.prototype.as = function () {
        _super.prototype.as.call(this);
        if (!this.q) {
            this.e.bx = 1;
        }
    };
    Object.defineProperty(SplineAreaSeriesView.prototype, "dn", {
        get: function () {
            return this.dl;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SplineAreaSeriesView.prototype, "dp", {
        get: function () {
            return this.dm;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SplineAreaSeriesView.prototype, "dq", {
        get: function () {
            return this.dj;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(SplineAreaSeriesView.prototype, "dr", {
        get: function () {
            return this.dk;
        },
        enumerable: true,
        configurable: true
    });
    SplineAreaSeriesView.prototype.dc = function () {
        this.dj.ak = null;
        this.dk.ak = null;
        this.dl.ak = null;
        this.dm.ak = null;
        this.aq();
    };
    SplineAreaSeriesView.prototype.dd = function (a, b, c, d, e, f, g) {
        this.de(a, b, c, d, e, f, g, null);
    };
    SplineAreaSeriesView.prototype.de = function (a, b, c, d, e, f, g, h) {
        this.db.tg.a = typeCast(ISortingAxis_$type, this.ct.fetchXAxis()) !== null ? true : false;
        this.db.tg.j(this.dj, this.dl, this.dk, this.dm, a, b, c, d, e, f, g, h);
        this.aq();
    };
    SplineAreaSeriesView.prototype.bc = function () {
        _super.prototype.bc.call(this);
        this.df.ak = this.dj.ak;
        this.dh.ak = this.dl.ak;
        this.dg.ak = this.dk.ak;
        this.di.ak = this.dm.ak;
        var a = this.bo();
        this.df._fill = a;
        this.df._opacity = 1;
        this.dg._fill = a;
        this.dg._opacity = 1;
        this.dh._stroke = a;
        this.dh.ac = this.e.eu + 3;
        this.di._stroke = a;
        this.di.ac = this.e.eu + 3;
    };
    SplineAreaSeriesView.prototype.a6 = function (a, b) {
        _super.prototype.a6.call(this, a, b);
        if (b) {
            a.s(this.df);
            a.s(this.dg);
            a.s(this.dh);
            a.s(this.di);
        }
        else {
            a.s(this.dj);
            a.s(this.dk);
            a.s(this.dl);
            a.s(this.dm);
        }
    };
    SplineAreaSeriesView.prototype.al = function (a) {
        _super.prototype.al.call(this, a);
        this.e.a5.exportPathData(a, this.dl, "lowerShape", ["Lower"]);
        this.e.a5.exportPathData(a, this.dm, "upperShape", ["Upper", "Main"]);
        this.e.a5.exportPathData(a, this.dk, "translucentShape", ["Translucent"]);
        this.e.a5.exportPathData(a, this.dj, "fillShape", ["Fill"]);
    };
    SplineAreaSeriesView.prototype.af = function () {
        var a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.ni = a;
        this.e.fs = 5;
        this.e.ft = 1;
        this.e.fu = -3;
    };
    SplineAreaSeriesView.$t = markType(SplineAreaSeriesView, 'SplineAreaSeriesView', SplineSeriesBaseView.$);
    return SplineAreaSeriesView;
}(SplineSeriesBaseView));
export { SplineAreaSeriesView };
//# sourceMappingURL=SplineAreaSeries_combined.js.map
