/*
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 { 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 { Defaults } from "./Defaults";
import { ISortingAxis_$type } from "./ISortingAxis";
import { Color } from "igniteui-react-core";
/**
 * @hidden
 */
var LineSeries = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(LineSeries, _super);
    function LineSeries() {
        var _this = _super.call(this) || this;
        _this.vj = null;
        _this.vj = new CategoryLineRasterizer();
        _this.ab = LineSeries.$;
        _this.u3 = 0;
        return _this;
    }
    LineSeries.prototype.get_d4 = function () {
        return true;
    };
    LineSeries.prototype.by = function () {
        return new LineSeriesView(this);
    };
    LineSeries.prototype.l4 = function (a) {
        _super.prototype.l4.call(this, a);
        this.vk = a;
    };
    LineSeries.prototype.get_dg = function () {
        return true;
    };
    LineSeries.prototype.preferredCategoryMode = function (a) {
        return this.u3;
    };
    LineSeries.prototype.k2 = function (a, b) {
        _super.prototype.k2.call(this, a, b);
        var c = b;
        c.db();
    };
    LineSeries.prototype.tf = function (a, b) {
        _super.prototype.tf.call(this, a, b);
        var c = b.cr.d;
        var d = typeCast(LineSeriesView.$, 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.ch, f);
            this.tb(e, -1, this.valueColumn.count, this.u0, i, b.q);
        }
        var j = d.dh;
        var k = d.di;
        var l = d.dg;
        this.r5.ad(j, true, false, true, false);
        this.r5.ad(k, true, false, true, false);
        this.r5.ad(l, false, true, false, false);
        l._opacity = 0.75 * this.r5.j;
        if (b.cv(a)) {
            d.dc(e.count, e, true, this.unknownValuePlotting, this.tn(e, e.count - 1, b.bu, b.bv), c, this.fx);
            b.cy(a);
        }
    };
    LineSeries.prototype.l9 = function (a, b, c, d) {
        _super.prototype.l9.call(this, a, b, c, d);
        switch (b) {
            case LineSeries.$$p[0]:
                this.r2.m = this.unknownValuePlotting == 0;
                this.mn(false);
                this.lu();
                break;
        }
    };
    Object.defineProperty(LineSeries.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.ss;
        },
        enumerable: false,
        configurable: true
    });
    LineSeries.$t = markType(LineSeries, 'LineSeries', HorizontalAnchoredCategorySeries.$, [IUnknownValuePlotting_$type]);
    LineSeries.$$p = markDep(DependencyProperty, PropertyMetadata, LineSeries, 'raisePropertyChanged', ['UnknownValuePlotting::vm', [UnknownValuePlotting_$type, enumGetBox(UnknownValuePlotting_$type, 1)]]);
    return LineSeries;
}(HorizontalAnchoredCategorySeries));
export { LineSeries };
/**
 * @hidden
 */
var LineSeriesView = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(LineSeriesView, _super);
    function LineSeriesView(a) {
        var _this = _super.call(this, a) || this;
        _this.da = null;
        _this.dk = new Path();
        _this.dj = new Path();
        _this.dl = new Path();
        _this.df = new Path();
        _this.de = new Path();
        _this.dd = new Path();
        _this.da = a;
        return _this;
    }
    LineSeriesView.prototype.as = function () {
        _super.prototype.as.call(this);
        if (!this.q) {
            this.da.ql = Defaults.e;
        }
    };
    Object.defineProperty(LineSeriesView.prototype, "dh", {
        get: function () {
            return this.dk;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(LineSeriesView.prototype, "di", {
        get: function () {
            return this.dl;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(LineSeriesView.prototype, "dg", {
        get: function () {
            return this.dj;
        },
        enumerable: false,
        configurable: true
    });
    LineSeriesView.prototype.db = function () {
        this.dj.an = null;
        this.dk.an = null;
        this.dl.an = null;
        this.aq();
    };
    LineSeriesView.prototype.dc = function (a, b, c, d, e, f, g) {
        this.da.vj.a = typeCast(ISortingAxis_$type, this.ct.fetchXAxis()) !== null ? true : false;
        this.da.vj.m(this.dk, this.dj, this.dl, a, b, c, d, e, f, g);
        this.aq();
    };
    LineSeriesView.prototype.bb = function () {
        _super.prototype.bb.call(this);
    };
    LineSeriesView.prototype.bc = function () {
        _super.prototype.bc.call(this);
        this.de.an = this.dk.an;
        this.df.an = this.dl.an;
        this.dd.an = this.dj.an;
        var a = this.bo();
        this.de._stroke = a;
        this.de.ad = this.e.fy + 3;
        this.df._stroke = a;
        this.df.ad = this.e.fy + 3;
        this.dd._fill = a;
        this.dd._opacity = 1;
    };
    LineSeriesView.prototype.a6 = function (a, b) {
        _super.prototype.a6.call(this, a, b);
        if (a.d) {
            if (b) {
                a.t(this.dd);
                a.t(this.de);
                a.t(this.df);
            }
            else {
                a.t(this.dj);
                a.t(this.dk);
                a.t(this.dl);
            }
        }
    };
    LineSeriesView.prototype.al = function (a) {
        _super.prototype.al.call(this, a);
        this.e.a9.exportPathData(a, this.dk, "lowerShape", ["Lower", "Main"]);
        this.e.a9.exportPathData(a, this.dl, "upperShape", ["Upper"]);
        this.e.a9.exportPathData(a, this.dj, "translucentShape", ["Translucent"]);
    };
    LineSeriesView.prototype.af = function () {
        var a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.ph = a;
        this.e.g1 = 3;
        this.e.g2 = 1;
        this.e.g3 = 4;
        this.e.fb = false;
    };
    LineSeriesView.$t = markType(LineSeriesView, 'LineSeriesView', AnchoredCategorySeriesView.$);
    return LineSeriesView;
}(AnchoredCategorySeriesView));
export { LineSeriesView };
