/*
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 { HorizontalAnchoredCategorySeries } from "./HorizontalAnchoredCategorySeries";
import { IUnknownValuePlotting_$type } from "igniteui-react-core/ES5/IUnknownValuePlotting";
import { CategoryLineRasterizer } from "./CategoryLineRasterizer";
import { UnknownValuePlotting_$type } from "igniteui-react-core/ES5/UnknownValuePlotting";
import { DependencyProperty } from "igniteui-react-core/ES5/DependencyProperty";
import { Type, typeCast, runOn, enumGetBox, markType } from "igniteui-react-core/ES5/type";
import { Path } from "igniteui-react-core/ES5/Path";
import { ScalerParams } from "./ScalerParams";
import { PropertyMetadata } from "igniteui-react-core/ES5/PropertyMetadata";
import { AnchoredCategorySeriesView } from "./AnchoredCategorySeriesView";
import { ISortingAxis_$type } from "./ISortingAxis";
import { Color } from "igniteui-react-core/ES5/Color";
var AreaSeries = /** @class */ (function (_super) {
    tslib_1.__extends(AreaSeries, _super);
    function AreaSeries() {
        var _this = _super.call(this) || this;
        _this.p7 = null;
        _this.p7 = new CategoryLineRasterizer();
        _this.ab = AreaSeries.$;
        _this.pq = 0;
        return _this;
    }
    AreaSeries.prototype.bf = function () {
        return new AreaSeriesView(this);
    };
    AreaSeries.prototype.m4 = function () {
        return 1;
    };
    AreaSeries.prototype.ii = function (a) {
        _super.prototype.ii.call(this, a);
        this.p6 = a;
    };
    AreaSeries.prototype.get_cj = function () {
        return true;
    };
    Object.defineProperty(AreaSeries.prototype, "cj", {
        get: function () {
            return this.get_cj();
        },
        enumerable: true,
        configurable: true
    });
    AreaSeries.prototype.preferredCategoryMode = function (a) {
        return this.pq;
    };
    AreaSeries.prototype.de = function (a, b) {
        var c = this.k9(this.lc(a), true, false);
        if (this.px(a, c, b)) {
            return true;
        }
        if (this.dd(a, b)) {
            return true;
        }
        if (this.ls(a, b)) {
            return true;
        }
        return false;
    };
    AreaSeries.prototype.hl = function (a, b) {
        _super.prototype.hl.call(this, a, b);
        var c = b;
        c.c5();
    };
    AreaSeries.prototype.ob = function (a, b) {
        var _this = this;
        _super.prototype.ob.call(this, a, b);
        var c = b.cl.d;
        var d = typeCast(AreaSeriesView.$, b);
        var e = a.f;
        var f = this.getEffectiveViewport1(d);
        this.m2.x(this, this.nn(), this.pn, runOn(this, this.mo), this.nv(b), this.nw(b));
        var g = false;
        var h = this.m2.c;
        if (h != null) {
            g = true;
        }
        if (g) {
            var i = new ScalerParams(0, b.bq, b.bp, this.pn.b8, f);
            this.n7(e, -1, this.valueColumn.count, this.pn, i, b.n);
        }
        var j = d.dc;
        var k = d.dd;
        var l = d.df;
        var m = d.dh;
        this.m2.ae(j, true, false, true, true);
        this.m2.ae(k, true, false, true, true);
        this.m2.ae(l, false, true, false, false);
        this.m2.ae(m, false, true, false, false);
        if (b.cp(a)) {
            d.c7(e.count, e, true, c, this.eo, function (n, o, p, q, r) { return _this.o7(n, a.f.count, b); }, this.unknownValuePlotting, e.count == 1 ? null : this.om(e, e.count - 1, b.bp, b.bq, true));
            b.cs(a);
        }
        var n = this.fetchYAxis();
        l._opacity = this.m2.i * this.d1;
        m._opacity = 0.5 * this.m2.i * this.d1;
    };
    AreaSeries.prototype.io = function (a, b, c, d) {
        _super.prototype.io.call(this, a, b, c, d);
        switch (b) {
            case AreaSeries.$$p[0]:
                this.mz.m = this.unknownValuePlotting == 0;
                this.i1(false);
                this.h8();
                break;
        }
    };
    Object.defineProperty(AreaSeries.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.nq;
        },
        enumerable: true,
        configurable: true
    });
    AreaSeries.$t = markType(AreaSeries, 'AreaSeries', HorizontalAnchoredCategorySeries.$, [IUnknownValuePlotting_$type]);
    return AreaSeries;
}(HorizontalAnchoredCategorySeries));
export { AreaSeries };
Type.dep(DependencyProperty, PropertyMetadata, AreaSeries, 'raisePropertyChanged', ['UnknownValuePlotting::p9', [UnknownValuePlotting_$type, enumGetBox(UnknownValuePlotting_$type, 1)]]);
var AreaSeriesView = /** @class */ (function (_super) {
    tslib_1.__extends(AreaSeriesView, _super);
    function AreaSeriesView(a) {
        var _this = _super.call(this, a) || this;
        _this.c4 = null;
        _this.de = new Path();
        _this.di = new Path();
        _this.dg = new Path();
        _this.dj = new Path();
        _this.c8 = new Path();
        _this.da = new Path();
        _this.c9 = new Path();
        _this.db = new Path();
        _this.c4 = a;
        return _this;
    }
    AreaSeriesView.prototype.ap = function () {
        _super.prototype.ap.call(this);
        if (!this.n) {
            this.e.bj = 1;
        }
    };
    Object.defineProperty(AreaSeriesView.prototype, "dc", {
        get: function () {
            return this.di;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AreaSeriesView.prototype, "dd", {
        get: function () {
            return this.dj;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AreaSeriesView.prototype, "df", {
        get: function () {
            return this.de;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AreaSeriesView.prototype, "dh", {
        get: function () {
            return this.dg;
        },
        enumerable: true,
        configurable: true
    });
    AreaSeriesView.prototype.c5 = function () {
        this.de.aj = null;
        this.dg.aj = null;
        this.di.aj = null;
        this.dj.aj = null;
        this.an();
    };
    AreaSeriesView.prototype.c6 = function (a, b, c, d, e, f, g) {
        this.c7(a, b, c, d, e, f, g, null);
    };
    AreaSeriesView.prototype.c7 = function (a, b, c, d, e, f, g, h) {
        this.c4.p7.a = typeCast(ISortingAxis_$type, this.cn.fetchXAxis()) !== null ? true : false;
        this.c4.p7.j(this.de, this.di, this.dg, this.dj, a, b, c, d, e, f, g, h);
        this.an();
    };
    AreaSeriesView.prototype.a9 = function () {
        _super.prototype.a9.call(this);
        this.c8.aj = this.de.aj;
        this.da.aj = this.di.aj;
        this.c9.aj = this.dg.aj;
        this.db.aj = this.dj.aj;
        var a = this.bk();
        this.c8._fill = a;
        this.c8._opacity = 1;
        this.c9._fill = a;
        this.c9._opacity = 1;
        this.da._stroke = a;
        this.da.ac = this.e.es + 3;
        this.db._stroke = a;
        this.db.ac = this.e.es + 3;
    };
    AreaSeriesView.prototype.a3 = function (a, b) {
        _super.prototype.a3.call(this, a, b);
        if (b) {
            a.s(this.c8);
            a.s(this.c9);
            a.s(this.da);
            a.s(this.db);
        }
        else {
            a.s(this.de);
            a.s(this.dg);
            a.s(this.di);
            a.s(this.dj);
        }
    };
    AreaSeriesView.prototype.ai = function (a) {
        _super.prototype.ai.call(this, a);
        this.e.a2.exportPathData(a, this.di, "lowerShape", ["Lower"]);
        this.e.a2.exportPathData(a, this.dj, "upperShape", ["Upper", "Main"]);
        this.e.a2.exportPathData(a, this.dg, "translucentShape", ["Translucent"]);
        this.e.a2.exportPathData(a, this.de, "fillShape", ["Fill"]);
    };
    AreaSeriesView.prototype.ac = function () {
        var a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.ky = a;
        this.e.ep = 5;
        this.e.eq = 1;
        this.e.er = -3;
    };
    AreaSeriesView.$t = markType(AreaSeriesView, 'AreaSeriesView', AnchoredCategorySeriesView.$);
    return AreaSeriesView;
}(AnchoredCategorySeriesView));
export { AreaSeriesView };
/*<BeginStatics Name="Infragistics.Controls.Charts.AreaSeries" />*/
/*<EndStatics Name="Infragistics.Controls.Charts.AreaSeries" />*/
