/*
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-angular-core";
import { Path } from "igniteui-angular-core";
import { ScalerParams } from "./ScalerParams";
import { SplineSeriesBaseView } from "./SplineSeriesBaseView";
import { Defaults } from "./Defaults";
import { ISortingAxis_$type } from "./ISortingAxis";
import { Color } from "igniteui-angular-core";
/**
 * @hidden
 */
var SplineAreaSeries = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(SplineAreaSeries, _super);
    function SplineAreaSeries() {
        var _this = _super.call(this) || this;
        _this.vv = null;
        _this.vv = new CategoryLineRasterizer();
        _this.ab = SplineAreaSeries.$;
        return _this;
    }
    SplineAreaSeries.prototype.get_dd = function () {
        return true;
    };
    SplineAreaSeries.prototype.get_eh = function () {
        return true;
    };
    SplineAreaSeries.prototype.bx = function () {
        return new SplineAreaSeriesView(this);
    };
    SplineAreaSeries.prototype.r3 = function () {
        return 1;
    };
    SplineAreaSeries.prototype.l2 = function (a) {
        _super.prototype.l2.call(this, a);
        this.vw = a;
    };
    SplineAreaSeries.prototype.preferredCategoryMode = function (a) {
        return 0;
    };
    SplineAreaSeries.prototype.b3 = function () {
        if (this.b4 == 0) {
            return 2;
        }
        return _super.prototype.b3.call(this);
    };
    SplineAreaSeries.prototype.k0 = function (a, b) {
        _super.prototype.k0.call(this, a, b);
        var c = b;
        c.dd();
    };
    SplineAreaSeries.prototype.ex = function (a, b) {
        var c = this.pq(this.pt(a), true, false);
        if (this.u2(a, c, b)) {
            return true;
        }
        if (this.ew(a, b)) {
            return true;
        }
        if (this.qk(a, b)) {
            return true;
        }
        return false;
    };
    SplineAreaSeries.prototype.tb = function (a, b) {
        var _this = this;
        _super.prototype.tb.call(this, a, b);
        var c = this.r2.cr.d;
        var d = typeCast(SplineAreaSeriesView.$, b);
        var e = a.f;
        var f = this.getEffectiveViewport1(b);
        this.r1.a0(this, this.sl(), runOn(this, this.rm), this.st(b), this.su(b));
        var g = false;
        var h = this.r1.b;
        if (h != null) {
            g = true;
        }
        if (g) {
            var i = new ScalerParams(0, b.bv, b.bu, this.us.cg, f);
            this.s7(e, -1, this.valueColumn.count, this.us, i, b.q);
        }
        var j = d.dp;
        var k = d.dq;
        var l = d.dr;
        var m = d.ds;
        this.r1.ad(j, true, false, true, true);
        this.r1.ad(k, true, false, true, true);
        this.r1.ad(l, false, true, false, false);
        this.r1.ad(m, false, true, false, false);
        l._opacity = this.r1.j * this.fs;
        m._opacity = 0.5 * this.r1.j * this.fs;
        if (b.cv(a)) {
            d.df(a.f.count, e, true, c, this.fv, function (n, o, p, q, r) { return _this.ua(n, a.f.count, b); }, 1, a.f.count == 1 ? null : this.tk(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.so;
        },
        enumerable: false,
        configurable: true
    });
    SplineAreaSeries.$t = markType(SplineAreaSeries, 'SplineAreaSeries', SplineSeriesBase.$);
    return SplineAreaSeries;
}(SplineSeriesBase));
export { SplineAreaSeries };
/**
 * @hidden
 */
var SplineAreaSeriesView = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(SplineAreaSeriesView, _super);
    function SplineAreaSeriesView(a) {
        var _this = _super.call(this, a) || this;
        _this.dc = null;
        _this.dk = new Path();
        _this.dm = new Path();
        _this.dl = new Path();
        _this.dn = new Path();
        _this.dg = new Path();
        _this.di = new Path();
        _this.dh = new Path();
        _this.dj = new Path();
        _this.dc = a;
        return _this;
    }
    SplineAreaSeriesView.prototype.as = function () {
        _super.prototype.as.call(this);
        if (!this.q) {
            this.dc.qh = Defaults.e;
        }
    };
    Object.defineProperty(SplineAreaSeriesView.prototype, "dp", {
        get: function () {
            return this.dm;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SplineAreaSeriesView.prototype, "dq", {
        get: function () {
            return this.dn;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SplineAreaSeriesView.prototype, "dr", {
        get: function () {
            return this.dk;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SplineAreaSeriesView.prototype, "ds", {
        get: function () {
            return this.dl;
        },
        enumerable: false,
        configurable: true
    });
    SplineAreaSeriesView.prototype.dd = function () {
        this.dk.ak = null;
        this.dl.ak = null;
        this.dm.ak = null;
        this.dn.ak = null;
        this.aq();
    };
    SplineAreaSeriesView.prototype.de = function (a, b, c, d, e, f, g) {
        this.df(a, b, c, d, e, f, g, null);
    };
    SplineAreaSeriesView.prototype.df = function (a, b, c, d, e, f, g, h) {
        this.dc.vv.a = typeCast(ISortingAxis_$type, this.ct.fetchXAxis()) !== null ? true : false;
        this.dc.vv.j(this.dk, this.dm, this.dl, this.dn, a, b, c, d, e, f, g, h);
        this.aq();
    };
    SplineAreaSeriesView.prototype.bc = function () {
        _super.prototype.bc.call(this);
        this.dg.ak = this.dk.ak;
        this.di.ak = this.dm.ak;
        this.dh.ak = this.dl.ak;
        this.dj.ak = this.dn.ak;
        var a = this.bo();
        this.dg._fill = a;
        this.dg._opacity = 1;
        this.dh._fill = a;
        this.dh._opacity = 1;
        this.di._stroke = a;
        this.di.ac = this.e.fw + 3;
        this.dj._stroke = a;
        this.dj.ac = this.e.fw + 3;
    };
    SplineAreaSeriesView.prototype.a6 = function (a, b) {
        _super.prototype.a6.call(this, a, b);
        if (b) {
            a.t(this.dg);
            a.t(this.dh);
            a.t(this.di);
            a.t(this.dj);
        }
        else {
            a.t(this.dk);
            a.t(this.dl);
            a.t(this.dm);
            a.t(this.dn);
        }
    };
    SplineAreaSeriesView.prototype.al = function (a) {
        _super.prototype.al.call(this, a);
        this.e.a8.exportPathData(a, this.dm, "lowerShape", ["Lower"]);
        this.e.a8.exportPathData(a, this.dn, "upperShape", ["Upper", "Main"]);
        this.e.a8.exportPathData(a, this.dl, "translucentShape", ["Translucent"]);
        this.e.a8.exportPathData(a, this.dk, "fillShape", ["Fill"]);
    };
    SplineAreaSeriesView.prototype.af = function () {
        var a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.pf = a;
        this.e.gy = 5;
        this.e.gz = 1;
        this.e.g0 = -3;
    };
    SplineAreaSeriesView.$t = markType(SplineAreaSeriesView, 'SplineAreaSeriesView', SplineSeriesBaseView.$);
    return SplineAreaSeriesView;
}(SplineSeriesBaseView));
export { SplineAreaSeriesView };
