/*
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";
import { CategoryLineRasterizer } from "./CategoryLineRasterizer";
import { UnknownValuePlotting_$type } from "igniteui-react-core";
import { DependencyProperty } from "igniteui-react-core";
import { typeCast, runOn, enumGetBox, markType, markDep } from "igniteui-react-core";
import { Path } from "igniteui-react-core";
import { ScalerParams } from "./ScalerParams";
import { PropertyMetadata } from "igniteui-react-core";
import { AnchoredCategorySeriesView } from "./AnchoredCategorySeriesView";
import { ISortingAxis_$type } from "./ISortingAxis";
import { Color } from "igniteui-react-core";
/**
 * @hidden
 */
var AreaSeries = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(AreaSeries, _super);
    function AreaSeries() {
        var _this = _super.call(this) || this;
        _this.s7 = null;
        _this.s7 = new CategoryLineRasterizer();
        _this.ab = AreaSeries.$;
        _this.sq = 0;
        return _this;
    }
    AreaSeries.prototype.bp = function () {
        return new AreaSeriesView(this);
    };
    AreaSeries.prototype.p4 = function () {
        return 1;
    };
    AreaSeries.prototype.bv = function () {
        if (this.bw == 0) {
            return 2;
        }
        return _super.prototype.bv.call(this);
    };
    AreaSeries.prototype.kk = function (a) {
        _super.prototype.kk.call(this, a);
        this.s6 = a;
    };
    AreaSeries.prototype.get_cy = function () {
        return true;
    };
    AreaSeries.prototype.preferredCategoryMode = function (a) {
        return this.sq;
    };
    AreaSeries.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;
    };
    AreaSeries.prototype.jl = function (a, b) {
        _super.prototype.jl.call(this, a, b);
        var c = b;
        c.db();
    };
    AreaSeries.prototype.rc = function (a, b) {
        var _this = this;
        _super.prototype.rc.call(this, a, b);
        var c = b.cr.d;
        var d = typeCast(AreaSeriesView.$, b);
        var e = a.f;
        var f = this.getEffectiveViewport1(d);
        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.dm;
        var k = d.dn;
        var l = d.dp;
        var m = d.dq;
        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);
        if (b.cv(a)) {
            d.dd(e.count, e, true, c, this.fq, function (n, o, p, q, r) { return _this.r7(n, a.f.count, b); }, this.unknownValuePlotting, e.count == 1 ? null : this.rl(e, e.count - 1, b.bu, b.bv, true));
            b.cy(a);
        }
        var n = this.fetchYAxis();
        l._opacity = this.p2.j * this.er;
        m._opacity = 0.5 * this.p2.j * this.er;
    };
    AreaSeries.prototype.kp = function (a, b, c, d) {
        _super.prototype.kp.call(this, a, b, c, d);
        switch (b) {
            case AreaSeries.$$p[0]:
                this.pz.m = this.unknownValuePlotting == 0;
                this.k3(false);
                this.ka();
                break;
        }
    };
    Object.defineProperty(AreaSeries.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.qp;
        },
        enumerable: true,
        configurable: true
    });
    AreaSeries.$t = markType(AreaSeries, 'AreaSeries', HorizontalAnchoredCategorySeries.$, [IUnknownValuePlotting_$type]);
    AreaSeries.$$p = markDep(DependencyProperty, PropertyMetadata, AreaSeries, 'raisePropertyChanged', ['UnknownValuePlotting::s9', [UnknownValuePlotting_$type, enumGetBox(UnknownValuePlotting_$type, 1)]]);
    return AreaSeries;
}(HorizontalAnchoredCategorySeries));
export { AreaSeries };
/**
 * @hidden
 */
var AreaSeriesView = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(AreaSeriesView, _super);
    function AreaSeriesView(a) {
        var _this = _super.call(this, a) || this;
        _this.da = null;
        _this.di = new Path();
        _this.dk = new Path();
        _this.dj = new Path();
        _this.dl = new Path();
        _this.de = new Path();
        _this.dg = new Path();
        _this.df = new Path();
        _this.dh = new Path();
        _this.da = a;
        return _this;
    }
    AreaSeriesView.prototype.as = function () {
        _super.prototype.as.call(this);
        if (!this.q) {
            this.e.bx = 1;
        }
    };
    Object.defineProperty(AreaSeriesView.prototype, "dm", {
        get: function () {
            return this.dk;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AreaSeriesView.prototype, "dn", {
        get: function () {
            return this.dl;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AreaSeriesView.prototype, "dp", {
        get: function () {
            return this.di;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(AreaSeriesView.prototype, "dq", {
        get: function () {
            return this.dj;
        },
        enumerable: true,
        configurable: true
    });
    AreaSeriesView.prototype.db = function () {
        this.di.ak = null;
        this.dj.ak = null;
        this.dk.ak = null;
        this.dl.ak = null;
        this.aq();
    };
    AreaSeriesView.prototype.dc = function (a, b, c, d, e, f, g) {
        this.dd(a, b, c, d, e, f, g, null);
    };
    AreaSeriesView.prototype.dd = function (a, b, c, d, e, f, g, h) {
        this.da.s7.a = typeCast(ISortingAxis_$type, this.ct.fetchXAxis()) !== null ? true : false;
        this.da.s7.j(this.di, this.dk, this.dj, this.dl, a, b, c, d, e, f, g, h);
        this.aq();
    };
    AreaSeriesView.prototype.bc = function () {
        _super.prototype.bc.call(this);
        this.de.ak = this.di.ak;
        this.dg.ak = this.dk.ak;
        this.df.ak = this.dj.ak;
        this.dh.ak = this.dl.ak;
        var a = this.bo();
        this.de._fill = a;
        this.de._opacity = 1;
        this.df._fill = a;
        this.df._opacity = 1;
        this.dg._stroke = a;
        this.dg.ac = this.e.eu + 3;
        this.dh._stroke = a;
        this.dh.ac = this.e.eu + 3;
    };
    AreaSeriesView.prototype.a6 = function (a, b) {
        _super.prototype.a6.call(this, a, b);
        if (b) {
            a.s(this.de);
            a.s(this.df);
            a.s(this.dg);
            a.s(this.dh);
        }
        else {
            a.s(this.di);
            a.s(this.dj);
            a.s(this.dk);
            a.s(this.dl);
        }
    };
    AreaSeriesView.prototype.al = function (a) {
        _super.prototype.al.call(this, a);
        this.e.a5.exportPathData(a, this.dk, "lowerShape", ["Lower"]);
        this.e.a5.exportPathData(a, this.dl, "upperShape", ["Upper", "Main"]);
        this.e.a5.exportPathData(a, this.dj, "translucentShape", ["Translucent"]);
        this.e.a5.exportPathData(a, this.di, "fillShape", ["Fill"]);
    };
    AreaSeriesView.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;
    };
    AreaSeriesView.$t = markType(AreaSeriesView, 'AreaSeriesView', AnchoredCategorySeriesView.$);
    return AreaSeriesView;
}(AnchoredCategorySeriesView));
export { AreaSeriesView };
//# sourceMappingURL=AreaSeries_combined.js.map
