/*
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";
/**
 * @hidden
 */
var SplineSeries = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(SplineSeries, _super);
    function SplineSeries() {
        var _this = _super.call(this) || this;
        _this.ads = null;
        _this.ads = new CategoryLineRasterizer();
        _this.ab = SplineSeries.$;
        return _this;
    }
    SplineSeries.prototype.bk = function () {
        return new SplineSeries();
    };
    SplineSeries.prototype.get_f1 = function () {
        return true;
    };
    SplineSeries.prototype.ct = function () {
        return new SplineSeriesView(this);
    };
    SplineSeries.prototype.zy = function () {
        return true;
    };
    SplineSeries.prototype.q7 = function (a) {
        _super.prototype.q7.call(this, a);
        this.adt = a;
    };
    SplineSeries.prototype.preferredCategoryMode = function (a) {
        return 0;
    };
    SplineSeries.prototype.pb = function (a, b) {
        _super.prototype.pb.call(this, a, b);
        var c = b;
        c.dw();
    };
    SplineSeries.prototype.aax = function (a, b) {
        _super.prototype.aax.call(this, a, b);
        var c = b;
        var d = c.c9.d;
        var e = typeCast(SplineSeriesView.$, b);
        var f = a.h;
        var g = this.getEffectiveViewport1(b);
        this.zc.a2(this, this.zw(), runOn(this, this.yw), this.z5(b), this.z6(b));
        var h = false;
        var i = this.zc.b;
        if (i != null) {
            h = true;
        }
        if (h) {
            var j = new ScalerParams(0, b.ca, b.b9, this.acp.df, g);
            this.aat(f, -1, this.valueColumn.count, this.acp, j, b.t, -1);
        }
        var k = e.d2;
        var l = e.d3;
        var m = e.d1;
        this.zc.ad(k, true, false, true, false);
        this.zc.ad(l, true, false, true, false);
        this.zc.ad(m, false, true, false, false);
        m._opacity = 0.75 * this.zc.j;
        if (b.dd(a)) {
            e.dx(f.count, f, true, 1, this.aa5(f, f.count - 1, b.b9, b.ca), d, this.ie);
            b.dg(a);
        }
    };
    Object.defineProperty(SplineSeries.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.z0;
        },
        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.dv = null;
        _this.d5 = new Path();
        _this.d4 = new Path();
        _this.d6 = new Path();
        _this.d0 = new Path();
        _this.dz = new Path();
        _this.dy = new Path();
        _this.dv = a;
        return _this;
    }
    SplineSeriesView.prototype.a4 = function () {
        _super.prototype.a4.call(this);
        if (!this.t) {
            this.dv.xk = Defaults.e;
        }
    };
    Object.defineProperty(SplineSeriesView.prototype, "d2", {
        get: function () {
            return this.d5;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SplineSeriesView.prototype, "d3", {
        get: function () {
            return this.d6;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(SplineSeriesView.prototype, "d1", {
        get: function () {
            return this.d4;
        },
        enumerable: false,
        configurable: true
    });
    SplineSeriesView.prototype.dw = function () {
        this.d4.an = null;
        this.d5.an = null;
        this.d6.an = null;
        this.a2();
    };
    SplineSeriesView.prototype.dx = function (a, b, c, d, e, f, g) {
        this.dv.ads.a = typeCast(ISortingAxis_$type, this.db.fetchXAxis()) !== null ? true : false;
        this.dv.ads.m(this.d5, this.d4, this.d6, a, b, c, d, e, f, g);
        this.a2();
    };
    SplineSeriesView.prototype.bq = function () {
        _super.prototype.bq.call(this);
        this.dz.an = this.d5.an;
        this.d0.an = this.d6.an;
        this.dy.an = this.d4.an;
        var a = this.b3();
        this.dz._stroke = a;
        this.dz.ad = this.f.ig + 3;
        this.d0._stroke = a;
        this.d0.ad = this.f.ig + 3;
        this.dy._fill = a;
        this.dy._opacity = 1;
    };
    SplineSeriesView.prototype.bj = function (a, b) {
        _super.prototype.bj.call(this, a, b);
        if (a.d) {
            if (b) {
                a.t(this.dy);
                a.t(this.dz);
                a.t(this.d0);
            }
            else {
                a.t(this.d4);
                a.t(this.d5);
                a.t(this.d6);
            }
        }
    };
    SplineSeriesView.prototype.ax = function (a) {
        _super.prototype.ax.call(this, a);
        this.f.bc.exportPathData(a, this.d5, "lowerShape", ["Lower", "Main"]);
        this.f.bc.exportPathData(a, this.d6, "upperShape", ["Upper"]);
        this.f.bc.exportPathData(a, this.d4, "translucentShape", ["Translucent"]);
    };
    SplineSeriesView.$t = markType(SplineSeriesView, 'SplineSeriesView', SplineSeriesBaseView.$);
    return SplineSeriesView;
}(SplineSeriesBaseView));
export { SplineSeriesView };
