/*
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 { List$1 } from "igniteui-react-core";
import { Path } from "igniteui-react-core";
import { ScalerParams } from "./ScalerParams";
import { ChartSelection } from "./ChartSelection";
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.acu = null;
        _this.acu = new CategoryLineRasterizer();
        _this.ab = LineSeries.$;
        _this.ace = 0;
        return _this;
    }
    LineSeries.prototype.bj = function () {
        return new LineSeries();
    };
    LineSeries.prototype.get_fk = function () {
        return true;
    };
    LineSeries.prototype.cs = function () {
        return new LineSeriesView(this);
    };
    LineSeries.prototype.qz = function (a) {
        _super.prototype.qz.call(this, a);
        this.acv = a;
    };
    LineSeries.prototype.zm = function () {
        return true;
    };
    LineSeries.prototype.get_ev = function () {
        return true;
    };
    LineSeries.prototype.preferredCategoryMode = function (a) {
        return this.ace;
    };
    LineSeries.prototype.o5 = function (a, b) {
        _super.prototype.o5.call(this, a, b);
        var c = b;
        c.dg();
    };
    LineSeries.prototype.aai = function (a, b) {
        _super.prototype.aai.call(this, a, b);
        var c = b.cw.d;
        var d = typeCast(LineSeriesView.$, b);
        var e = a.f;
        var f = this.getEffectiveViewport1(b);
        this.y0.a2(this, this.zk(), runOn(this, this.yk), this.zt(b), this.zu(b));
        var g = false;
        var h = this.y0.b;
        if (h != null) {
            g = true;
        }
        if (g) {
            var i = new ScalerParams(0, b.by, b.bx, this.acb.ch, f);
            this.aae(e, -1, this.valueColumn.count, this.acb, i, b.q, -1);
        }
        var j = d.dm;
        var k = d.dn;
        var l = d.dl;
        this.y0.ad(j, true, false, true, false);
        this.y0.ad(k, true, false, true, false);
        this.y0.ad(l, false, true, false, false);
        l._opacity = 0.75 * this.y0.j;
        if (b.c0(a)) {
            d.dh(e.count, e, true, this.unknownValuePlotting, this.aar(e, e.count - 1, b.bx, b.by), c, this.id);
            b.c3(a);
        }
    };
    LineSeries.prototype.ak = function (a, b) {
        var c = new List$1(ChartSelection.$, 0);
        this.p2(a, c, b);
        return c.toArray();
    };
    LineSeries.prototype.p2 = function (a, b, c) {
        this.aaa(a, b, c, this.yr, 0);
    };
    LineSeries.prototype.q7 = function (a, b, c, d) {
        _super.prototype.q7.call(this, a, b, c, d);
        switch (b) {
            case LineSeries.$$p[0]:
                this.yx.m = this.unknownValuePlotting == 0;
                this.rp(false);
                this.qj();
                break;
        }
    };
    Object.defineProperty(LineSeries.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.zo;
        },
        enumerable: false,
        configurable: true
    });
    LineSeries.$t = markType(LineSeries, 'LineSeries', HorizontalAnchoredCategorySeries.$, [IUnknownValuePlotting_$type]);
    LineSeries.$$p = markDep(DependencyProperty, PropertyMetadata, LineSeries, 'raisePropertyChanged', ['UnknownValuePlotting::acx', [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.df = null;
        _this.dq = new Path();
        _this.dp = new Path();
        _this.dr = new Path();
        _this.dk = new Path();
        _this.dj = new Path();
        _this.di = new Path();
        _this.df = a;
        return _this;
    }
    LineSeriesView.prototype.au = function () {
        _super.prototype.au.call(this);
        if (!this.q) {
            this.df.w8 = Defaults.e;
        }
    };
    Object.defineProperty(LineSeriesView.prototype, "dm", {
        get: function () {
            return this.dq;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(LineSeriesView.prototype, "dn", {
        get: function () {
            return this.dr;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(LineSeriesView.prototype, "dl", {
        get: function () {
            return this.dp;
        },
        enumerable: false,
        configurable: true
    });
    LineSeriesView.prototype.dg = function () {
        this.dp.an = null;
        this.dq.an = null;
        this.dr.an = null;
        this.as();
    };
    LineSeriesView.prototype.dh = function (a, b, c, d, e, f, g) {
        this.df.acu.a = typeCast(ISortingAxis_$type, this.cy.fetchXAxis()) !== null ? true : false;
        this.df.acu.m(this.dq, this.dp, this.dr, a, b, c, d, e, f, g);
        this.as();
    };
    LineSeriesView.prototype.bd = function () {
        _super.prototype.bd.call(this);
    };
    LineSeriesView.prototype.be = function () {
        _super.prototype.be.call(this);
        this.dj.an = this.dq.an;
        this.dk.an = this.dr.an;
        this.di.an = this.dp.an;
        var a = this.br();
        this.dj._stroke = a;
        this.dj.ad = this.e.ie + 3;
        this.dk._stroke = a;
        this.dk.ad = this.e.ie + 3;
        this.di._fill = a;
        this.di._opacity = 1;
    };
    LineSeriesView.prototype.a8 = function (a, b) {
        _super.prototype.a8.call(this, a, b);
        if (a.d) {
            if (b) {
                a.t(this.di);
                a.t(this.dj);
                a.t(this.dk);
            }
            else {
                a.t(this.dp);
                a.t(this.dq);
                a.t(this.dr);
            }
        }
    };
    LineSeriesView.prototype.an = function (a) {
        _super.prototype.an.call(this, a);
        this.e.bc.exportPathData(a, this.dq, "lowerShape", ["Lower", "Main"]);
        this.e.bc.exportPathData(a, this.dr, "upperShape", ["Upper"]);
        this.e.bc.exportPathData(a, this.dp, "translucentShape", ["Translucent"]);
    };
    LineSeriesView.prototype.af = function () {
        var a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.e.vz = a;
        this.e.jm = 3;
        this.e.jn = 1;
        this.e.jo = 4;
        this.e.hc = false;
    };
    LineSeriesView.$t = markType(LineSeriesView, 'LineSeriesView', AnchoredCategorySeriesView.$);
    return LineSeriesView;
}(AnchoredCategorySeriesView));
export { LineSeriesView };
