/*
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.v3 = null;
        _this.v3 = new CategoryLineRasterizer();
        _this.ab = SplineAreaSeries.$;
        return _this;
    }
    SplineAreaSeries.prototype.get_df = function () {
        return true;
    };
    SplineAreaSeries.prototype.get_ej = function () {
        return true;
    };
    SplineAreaSeries.prototype.by = function () {
        return new SplineAreaSeriesView(this);
    };
    SplineAreaSeries.prototype.r7 = function () {
        return 1;
    };
    SplineAreaSeries.prototype.l4 = function (a) {
        _super.prototype.l4.call(this, a);
        this.v4 = a;
    };
    SplineAreaSeries.prototype.preferredCategoryMode = function (a) {
        return 0;
    };
    SplineAreaSeries.prototype.b4 = function () {
        if (this.b5 == 0) {
            return 2;
        }
        return _super.prototype.b4.call(this);
    };
    SplineAreaSeries.prototype.k2 = function (a, b) {
        _super.prototype.k2.call(this, a, b);
        var c = b;
        c.dd();
    };
    SplineAreaSeries.prototype.ez = function (a, b) {
        var c = this.ps(this.px(a), true, false);
        if (this.va(a, c, b)) {
            return true;
        }
        if (this.ey(a, b)) {
            return true;
        }
        if (this.qo(a, b)) {
            return true;
        }
        return false;
    };
    SplineAreaSeries.prototype.tf = function (a, b) {
        var _this = this;
        _super.prototype.tf.call(this, a, b);
        var c = this.r6.cr.d;
        var d = typeCast(SplineAreaSeriesView.$, b);
        var e = a.f;
        var f = this.getEffectiveViewport1(b);
        this.r5.a2(this, this.sp(), runOn(this, this.rq), this.sx(b), this.sy(b));
        var g = false;
        var h = this.r5.b;
        if (h != null) {
            g = true;
        }
        if (g) {
            var i = new ScalerParams(0, b.bv, b.bu, this.u0.cg, f);
            this.tb(e, -1, this.valueColumn.count, this.u0, i, b.q);
        }
        var j = d.dp;
        var k = d.dq;
        var l = d.dr;
        var m = d.ds;
        this.r5.ad(j, true, false, true, true);
        this.r5.ad(k, true, false, true, true);
        this.r5.ad(l, false, true, false, false);
        this.r5.ad(m, false, true, false, false);
        l._opacity = this.r5.j * this.fu;
        m._opacity = 0.5 * this.r5.j * this.fu;
        if (b.cv(a)) {
            d.df(a.f.count, e, true, c, this.fx, function (n, o, p, q, r) { return _this.uh(n, a.f.count, b); }, 1, a.f.count == 1 ? null : this.to(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.ss;
        },
        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.ql = 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.an = null;
        this.dl.an = null;
        this.dm.an = null;
        this.dn.an = 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.v3.a = typeCast(ISortingAxis_$type, this.ct.fetchXAxis()) !== null ? true : false;
        this.dc.v3.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.an = this.dk.an;
        this.di.an = this.dm.an;
        this.dh.an = this.dl.an;
        this.dj.an = this.dn.an;
        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.ad = this.e.fy + 3;
        this.dj._stroke = a;
        this.dj.ad = this.e.fy + 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.a9.exportPathData(a, this.dm, "lowerShape", ["Lower"]);
        this.e.a9.exportPathData(a, this.dn, "upperShape", ["Upper", "Main"]);
        this.e.a9.exportPathData(a, this.dl, "translucentShape", ["Translucent"]);
        this.e.a9.exportPathData(a, this.dk, "fillShape", ["Fill"]);
    };
    SplineAreaSeriesView.prototype.af = function () {
        var a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.ph = a;
        this.e.g1 = 5;
        this.e.g2 = 1;
        this.e.g3 = -3;
    };
    SplineAreaSeriesView.$t = markType(SplineAreaSeriesView, 'SplineAreaSeriesView', SplineSeriesBaseView.$);
    return SplineAreaSeriesView;
}(SplineSeriesBaseView));
export { SplineAreaSeriesView };
