/*
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 { RangeCategorySeries } from "./RangeCategorySeries";
import { CategoryAxisBase } from "./CategoryAxisBase";
import { DependencyProperty } from "igniteui-react-core/ES5/DependencyProperty";
import { NumericYAxis } from "./NumericYAxis";
import { Axis } from "./Axis";
import { Type, Point_$type, runOn, typeCast, markType } from "igniteui-react-core/ES5/type";
import { RangeValueList } from "./RangeValueList";
import { ScalerParams } from "./ScalerParams";
import { CategoryXAxis } from "./CategoryXAxis";
import { PropertyMetadata } from "igniteui-react-core/ES5/PropertyMetadata";
var HorizontalRangeCategorySeries = /** @class */ (function (_super) {
    tslib_1.__extends(HorizontalRangeCategorySeries, _super);
    function HorizontalRangeCategorySeries() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    HorizontalRangeCategorySeries.prototype.fetchXAxis = function () {
        return this.xAxis;
    };
    HorizontalRangeCategorySeries.prototype.fetchYAxis = function () {
        return this.yAxis;
    };
    HorizontalRangeCategorySeries.prototype.hj = function () {
        _super.prototype.hj.call(this);
        this.xAxis = null;
        this.yAxis = null;
    };
    HorizontalRangeCategorySeries.prototype.ah = function (a) {
        var b = this.aj(this.mu(), this.mv.f, this.nv(this.bi), this.nw(this.bi), this.lc(a), true);
        if (b == null) {
            return null;
        }
        var c = b[0];
        var d = b[1];
        var e = new Array(1);
        var f = new Array(2);
        f[0] = { $type: Point_$type, x: c[0], y: c[2] };
        f[1] = { $type: Point_$type, x: d[0], y: d[2] };
        e[0] = f;
        return e;
    };
    HorizontalRangeCategorySeries.prototype.ai = function (a) {
        var b = this.aj(this.mu(), this.mv.f, this.nv(this.bi), this.nw(this.bi), this.lc(a), true);
        if (b == null) {
            return null;
        }
        var c = b[0];
        var d = b[1];
        var e = new Array(1);
        var f = new Array(2);
        f[0] = { $type: Point_$type, x: c[0], y: c[1] };
        f[1] = { $type: Point_$type, x: d[0], y: d[1] };
        e[0] = f;
        return e;
    };
    HorizontalRangeCategorySeries.prototype.get_c2 = function () {
        return true;
    };
    Object.defineProperty(HorizontalRangeCategorySeries.prototype, "c2", {
        get: function () {
            return this.get_c2();
        },
        enumerable: true,
        configurable: true
    });
    HorizontalRangeCategorySeries.prototype.bd = function () {
        if (this.be == 0) {
            return 1;
        }
        else {
            return _super.prototype.bd.call(this);
        }
    };
    HorizontalRangeCategorySeries.prototype.getOffsetValue = function () {
        return this.RangeFramePreparer.r(this.xAxis, this.bi.bq, this.bi.bp, this.getEffectiveViewport1(this.bi));
    };
    HorizontalRangeCategorySeries.prototype.getCategoryWidth = function () {
        return this.xAxis.getCategorySize(this.bi.bq, this.bi.bp, this.getEffectiveViewport1(this.bi));
    };
    HorizontalRangeCategorySeries.prototype.e6 = function (a, b) {
        return this.e7(a, b, this.xAxis, runOn(this, this.nt), new RangeValueList(this.highColumn, this.lowColumn));
    };
    HorizontalRangeCategorySeries.prototype.e8 = function (a, b) {
        return this.e9(a, b, this.xAxis, runOn(this, this.nt), new RangeValueList(this.highColumn, this.lowColumn));
    };
    HorizontalRangeCategorySeries.prototype.d4 = function (a, b, c, d, e) {
        if (c == null) {
            return Number.POSITIVE_INFINITY;
        }
        var f = this.xAxis.jq;
        return this.d5(a, b, this.xAxis, d, e, f, runOn(this, this.nt));
    };
    HorizontalRangeCategorySeries.prototype.eh = function (a, b, c) {
        if (this.bs == null) {
            return NaN;
        }
        var d = this.getEffectiveViewport1(this.bi);
        var e = new ScalerParams(0, this.bs.mk, this.bi.bp, this.xAxis.b8, d);
        var f = this.RangeFramePreparer.r(this.xAxis, this.bs.mk, this.bi.bp, d);
        return this.ej(new RangeValueList(this.highColumn, this.lowColumn), a, this.xAxis, e, f, runOn(this, this.nt), b, c);
    };
    HorizontalRangeCategorySeries.prototype.ef = function (a, b, c) {
        if (this.bs == null) {
            return NaN;
        }
        var d = this.getEffectiveViewport1(this.bi);
        var e = new ScalerParams(0, this.bs.mk, this.bi.bp, this.xAxis.b8, d);
        var f = this.RangeFramePreparer.r(this.xAxis, this.bs.mk, this.bi.bp, d);
        return this.ej(this.lowColumn, a, this.xAxis, e, f, runOn(this, this.nt), b, c);
    };
    HorizontalRangeCategorySeries.prototype.ed = function (a, b, c) {
        if (this.bs == null) {
            return NaN;
        }
        var d = this.getEffectiveViewport1(this.bi);
        var e = new ScalerParams(0, this.bs.mk, this.bi.bp, this.xAxis.b8, d);
        var f = this.RangeFramePreparer.r(this.xAxis, this.bs.mk, this.bi.bp, d);
        return this.ej(this.highColumn, a, this.xAxis, e, f, runOn(this, this.nt), b, c);
    };
    HorizontalRangeCategorySeries.prototype.k5 = function (a, b, c) {
        var _this = this;
        return this.lb(a, b, c, this.RangeFramePreparer.r(this.xAxis, this.bi.bq, this.bi.bp, this.getEffectiveViewport1(this.bi)), this.yAxis, this.xAxis, runOn(this, this.ed), function (d, e) { return _this.e9(d, e, _this.xAxis, runOn(_this, _this.nt), _this.highColumn); }, function (d, e) { return _this.e7(d, e, _this.xAxis, runOn(_this, _this.nt), _this.highColumn); });
    };
    HorizontalRangeCategorySeries.prototype.k7 = function (a, b, c) {
        var _this = this;
        return this.lb(a, b, c, this.RangeFramePreparer.r(this.xAxis, this.bi.bq, this.bi.bp, this.getEffectiveViewport1(this.bi)), this.yAxis, this.xAxis, runOn(this, this.ef), function (d, e) { return _this.e9(d, e, _this.xAxis, runOn(_this, _this.nt), _this.lowColumn); }, function (d, e) { return _this.e7(d, e, _this.xAxis, runOn(_this, _this.nt), _this.lowColumn); });
    };
    HorizontalRangeCategorySeries.prototype.k9 = function (a, b, c) {
        return this.lb(a, b, c, this.RangeFramePreparer.r(this.xAxis, this.bi.bq, this.bi.bp, this.getEffectiveViewport1(this.bi)), this.yAxis, this.xAxis, null, null, null);
    };
    HorizontalRangeCategorySeries.prototype.np = function () {
        return this.yAxis != null && this.yAxis.ck();
    };
    HorizontalRangeCategorySeries.prototype.io = function (a, b, c, d) {
        _super.prototype.io.call(this, a, b, c, d);
        switch (b) {
            case HorizontalRangeCategorySeries.$$p[0]:
                this.hp(typeCast(Axis.$, c));
                this.it(typeCast(Axis.$, d));
                this.m3.cl.g(this.eo);
                this.i1(false);
                this.h8();
                break;
            case HorizontalRangeCategorySeries.$$p[1]:
                this.hp(typeCast(Axis.$, c));
                this.it(typeCast(Axis.$, d));
                this.m3.cl.g(this.eo);
                this.np();
                this.i1(false);
                this.h8();
                break;
        }
    };
    HorizontalRangeCategorySeries.prototype.o3 = function (a) {
        if (typeCast(NumericYAxis.$, a) !== null) {
            return true;
        }
        return false;
    };
    HorizontalRangeCategorySeries.prototype.o2 = function (a) {
        if (typeCast(CategoryXAxis.$, a) !== null || a.b5) {
            return true;
        }
        return false;
    };
    Object.defineProperty(HorizontalRangeCategorySeries.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.nq;
        },
        enumerable: true,
        configurable: true
    });
    HorizontalRangeCategorySeries.$t = markType(HorizontalRangeCategorySeries, 'HorizontalRangeCategorySeries', RangeCategorySeries.$);
    return HorizontalRangeCategorySeries;
}(RangeCategorySeries));
export { HorizontalRangeCategorySeries };
Type.dep(DependencyProperty, PropertyMetadata, HorizontalRangeCategorySeries, 'raisePropertyChanged', ['XAxis::o6', [CategoryAxisBase.$, null], 'YAxis::o7', [NumericYAxis.$, null]]);
/*<BeginStatics Name="Infragistics.Controls.Charts.HorizontalRangeCategorySeries" />*/
/*<EndStatics Name="Infragistics.Controls.Charts.HorizontalRangeCategorySeries" />*/
