/*
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 { RangeCategorySeries } from "./RangeCategorySeries";
import { CategoryAxisBase } from "./CategoryAxisBase";
import { DependencyProperty } from "igniteui-react-core";
import { NumericYAxis } from "./NumericYAxis";
import { Axis } from "./Axis";
import { Point_$type, runOn, typeCast, markType, markDep } from "igniteui-react-core";
import { RangeValueList } from "./RangeValueList";
import { ScalerParams } from "./ScalerParams";
import { CategoryXAxis } from "./CategoryXAxis";
import { PropertyMetadata } from "igniteui-react-core";
/**
 * @hidden
 */
export let HorizontalRangeCategorySeries = /*@__PURE__*/ (() => {
    class HorizontalRangeCategorySeries extends RangeCategorySeries {
        fetchXAxis() {
            return this.xAxis;
        }
        fetchYAxis() {
            return this.yAxis;
        }
        ji() {
            super.ji();
            this.xAxis = null;
            this.yAxis = null;
        }
        ah(a) {
            let b = this.aj(this.pu(), this.pv.f, this.qu(this.bs), this.qv(this.bs), this.nw(a), true);
            if (b == null) {
                return null;
            }
            let c = b[0];
            let d = b[1];
            let e = new Array(1);
            let 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;
        }
        ai(a) {
            let b = this.aj(this.pu(), this.pv.f, this.qu(this.bs), this.qv(this.bs), this.nw(a), true);
            if (b == null) {
                return null;
            }
            let c = b[0];
            let d = b[1];
            let e = new Array(1);
            let 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;
        }
        get_di() {
            return true;
        }
        bj() {
            if (this.bk == 0) {
                return 1;
            }
            else {
                return super.bj();
            }
        }
        getOffsetValue() {
            return this.RangeFramePreparer.r(this.xAxis, this.bs.bv, this.bs.bu, this.getEffectiveViewport1(this.bs));
        }
        getCategoryWidth() {
            return this.xAxis.getCategorySize(this.bs.bv, this.bs.bu, this.getEffectiveViewport1(this.bs));
        }
        gd(a, b) {
            return this.ge(a, b, this.xAxis, runOn(this, this.qs), new RangeValueList(this.highColumn, this.lowColumn));
        }
        gf(a, b) {
            return this.gg(a, b, this.xAxis, runOn(this, this.qs), new RangeValueList(this.highColumn, this.lowColumn));
        }
        e2(a, b, c, d, e) {
            if (c == null) {
                return Number.POSITIVE_INFINITY;
            }
            let f = this.xAxis.j8;
            return this.e3(a, b, this.xAxis, d, e, f, runOn(this, this.qs));
        }
        fh(a, b, c) {
            if (this.b6 == null) {
                return NaN;
            }
            let d = this.getEffectiveViewport1(this.bs);
            let e = new ScalerParams(0, this.b6.os, this.bs.bu, this.xAxis.ca, d);
            let f = this.RangeFramePreparer.r(this.xAxis, this.b6.os, this.bs.bu, d);
            return this.fj(new RangeValueList(this.highColumn, this.lowColumn), a, this.xAxis, e, f, runOn(this, this.qs), b, c);
        }
        ff(a, b, c) {
            if (this.b6 == null) {
                return NaN;
            }
            let d = this.getEffectiveViewport1(this.bs);
            let e = new ScalerParams(0, this.b6.os, this.bs.bu, this.xAxis.ca, d);
            let f = this.RangeFramePreparer.r(this.xAxis, this.b6.os, this.bs.bu, d);
            return this.fj(this.lowColumn, a, this.xAxis, e, f, runOn(this, this.qs), b, c);
        }
        fd(a, b, c) {
            if (this.b6 == null) {
                return NaN;
            }
            let d = this.getEffectiveViewport1(this.bs);
            let e = new ScalerParams(0, this.b6.os, this.bs.bu, this.xAxis.ca, d);
            let f = this.RangeFramePreparer.r(this.xAxis, this.b6.os, this.bs.bu, d);
            return this.fj(this.highColumn, a, this.xAxis, e, f, runOn(this, this.qs), b, c);
        }
        np(a, b, c) {
            return this.nv(a, b, c, this.RangeFramePreparer.r(this.xAxis, this.bs.bv, this.bs.bu, this.getEffectiveViewport1(this.bs)), this.yAxis, this.xAxis, runOn(this, this.fd), (d, e) => this.gg(d, e, this.xAxis, runOn(this, this.qs), this.highColumn), (d, e) => this.ge(d, e, this.xAxis, runOn(this, this.qs), this.highColumn));
        }
        nr(a, b, c) {
            return this.nv(a, b, c, this.RangeFramePreparer.r(this.xAxis, this.bs.bv, this.bs.bu, this.getEffectiveViewport1(this.bs)), this.yAxis, this.xAxis, runOn(this, this.ff), (d, e) => this.gg(d, e, this.xAxis, runOn(this, this.qs), this.lowColumn), (d, e) => this.ge(d, e, this.xAxis, runOn(this, this.qs), this.lowColumn));
        }
        nt(a, b, c) {
            return this.nv(a, b, c, this.RangeFramePreparer.r(this.xAxis, this.bs.bv, this.bs.bu, this.getEffectiveViewport1(this.bs)), this.yAxis, this.xAxis, null, null, null);
        }
        qo() {
            return this.yAxis != null && this.yAxis.cn();
        }
        kp(a, b, c, d) {
            super.kp(a, b, c, d);
            switch (b) {
                case HorizontalRangeCategorySeries.$$p[0]:
                    this.jp(typeCast(Axis.$, c));
                    this.ku(typeCast(Axis.$, d));
                    this.p3.cr.g(this.fq);
                    this.k3(false);
                    this.ka();
                    break;
                case HorizontalRangeCategorySeries.$$p[1]:
                    this.jp(typeCast(Axis.$, c));
                    this.ku(typeCast(Axis.$, d));
                    this.p3.cr.g(this.fq);
                    this.qo();
                    this.k3(false);
                    this.ka();
                    break;
            }
        }
        r2(a) {
            if (typeCast(NumericYAxis.$, a) !== null) {
                return true;
            }
            return false;
        }
        r1(a) {
            if (typeCast(CategoryXAxis.$, a) !== null || a.b7) {
                return true;
            }
            return false;
        }
        get useHighMarkerFidelity() {
            return this.qp;
        }
    }
    HorizontalRangeCategorySeries.$t = /*@__PURE__*/ markType(HorizontalRangeCategorySeries, 'HorizontalRangeCategorySeries', RangeCategorySeries.$);
    HorizontalRangeCategorySeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, HorizontalRangeCategorySeries, 'raisePropertyChanged', ['XAxis::r5', [CategoryAxisBase.$, null], 'YAxis::r6', [NumericYAxis.$, null]]);
    return HorizontalRangeCategorySeries;
})();
//# sourceMappingURL=HorizontalRangeCategorySeries.js.map
