/*
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 { AnchoredCategorySeries } from "./AnchoredCategorySeries";
import { NumericXAxis } from "./NumericXAxis";
import { DependencyProperty } from "igniteui-react-core";
import { CategoryYAxis } from "./CategoryYAxis";
import { IVerticalAnchoredCategorySeriesInteractionManager_$type } from "./IVerticalAnchoredCategorySeriesInteractionManager";
import { DVContainer } from "igniteui-react-core";
import { runOn, typeCast, EnumUtil, markType, markDep } from "igniteui-react-core";
import { Axis } from "./Axis";
import { ScalerParams } from "./ScalerParams";
import { Rect } from "igniteui-react-core";
import { TrendLineType_$type } from "igniteui-react-core";
import { CategoryTrendLineManagerFactory } from "./CategoryTrendLineManagerFactory";
import { PropertyMetadata } from "igniteui-react-core";
import { truncate } from "igniteui-react-core";
/**
 * @hidden
 */
export let VerticalAnchoredCategorySeries = /*@__PURE__*/ (() => {
    class VerticalAnchoredCategorySeries extends AnchoredCategorySeries {
        constructor() {
            super(...arguments);
            this.qc = null;
        }
        h1() {
            super.h1();
            this.xAxis = null;
            this.yAxis = null;
        }
        get qd() {
            if (this.qc == null) {
                this.qc = DVContainer.instance.createInstance(IVerticalAnchoredCategorySeriesInteractionManager_$type, () => this.b2.n);
            }
            return this.qc;
        }
        get_isVertical() {
            return true;
        }
        nj() {
            return this.yAxis;
        }
        n3() {
            return this.xAxis;
        }
        getOffsetValue() {
            return this.no.r(this.nj(), this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi));
        }
        getCategoryWidth() {
            return this.yAxis.getCategorySize(this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi));
        }
        fc(a, b) {
            return this.fd(a, b, this.nj(), runOn(this, this.oi), this.valueColumn);
        }
        fe(a, b) {
            return this.ff(a, b, this.nj(), runOn(this, this.oi), this.valueColumn);
        }
        d9(a, b, c, d, e) {
            if (this.valueColumn == null) {
                return Number.POSITIVE_INFINITY;
            }
            return this.ea(a, b, this.yAxis, d, e, this.valueColumn.count, runOn(this, this.oi));
        }
        bd() {
            if (this.be == 0) {
                return 1;
            }
            else {
                return super.bd();
            }
        }
        l6(a) {
            if (!this.hasMarkers || !this.md()) {
                return Rect.empty;
            }
            return this.qd.e$b(this, this.nk.m, a, runOn(this, this.ql));
        }
        ql(a) {
            return this.pb.c5(a);
        }
        dh(a, b) {
            if (this.dg(a, b)) {
                return true;
            }
            if (this.me(a, b)) {
                return true;
            }
            return false;
        }
        en(a, b, c) {
            if (this.bs == null) {
                return NaN;
            }
            let d = this.getEffectiveViewport1(this.bi);
            let e = this.nj();
            let f = new ScalerParams(0, this.bs.n2, this.bi.br, e.ca, d);
            let g = this.no.r(e, this.bs.n2, this.bi.br, d);
            return this.ep(this.valueColumn, a, e, f, g, runOn(this, this.oi), b, c);
        }
        lv(a, b, c) {
            let d = this.nj();
            return this.lx(a, b, c, this.no.r(d, this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi)), this.n3(), d, null, null, null);
        }
        fetchXAxis() {
            return this.xAxis;
        }
        fetchYAxis() {
            return this.yAxis;
        }
        pt(a) {
            this.xAxis = typeCast(NumericXAxis.$, a);
        }
        pu(a) {
            this.yAxis = typeCast(CategoryYAxis.$, a);
        }
        oe() {
            return this.xAxis != null && this.xAxis.cn();
        }
        nd(a, b) {
            return this.o8(a, b, this.yAxis);
        }
        eb(a) {
            return this.qd.e$a(this, a);
        }
        oi(a) {
            return this.ed(a, this.nj());
        }
        e8(a) {
            return truncate(Math.round(this.eb(a)));
        }
        fp(a) {
            let b = this.e8(a);
            return b >= 0 && this.bz != null && b < this.bz.count ? this.bz.item(b) : null;
        }
        i7(a, b, c, d) {
            super.i7(a, b, c, d);
            switch (b) {
                case VerticalAnchoredCategorySeries.$$p[0]:
                    if (c != d) {
                        this.h7(typeCast(Axis.$, c));
                        this.jc(typeCast(Axis.$, d));
                        this.ns.cn.g(this.eu);
                        this.jl(false);
                        this.it();
                    }
                    break;
                case VerticalAnchoredCategorySeries.$$p[1]:
                    if (c != d) {
                        this.h7(typeCast(Axis.$, c));
                        this.jc(typeCast(Axis.$, d));
                        this.ns.cn.g(this.eu);
                        this.oe();
                        this.jl(false);
                        this.it();
                    }
                    break;
                case "TrendLineType":
                    let e = EnumUtil.getEnumValue(TrendLineType_$type, d);
                    if (e != 0) {
                        this.pb.cy = CategoryTrendLineManagerFactory.a(this.pb.cy, this.yAxis, this.j5, this, this.b2);
                    }
                    break;
            }
        }
        qg(a) {
            if (typeCast(CategoryYAxis.$, a) !== null) {
                return true;
            }
            return false;
        }
        qf(a) {
            if (typeCast(NumericXAxis.$, a) !== null) {
                return true;
            }
            return false;
        }
        get useHighMarkerFidelity() {
            return this.of;
        }
    }
    VerticalAnchoredCategorySeries.$t = /*@__PURE__*/ markType(VerticalAnchoredCategorySeries, 'VerticalAnchoredCategorySeries', AnchoredCategorySeries.$);
    VerticalAnchoredCategorySeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, VerticalAnchoredCategorySeries, 'raisePropertyChanged', ['XAxis::qj', [NumericXAxis.$, null], 'YAxis::qk', [CategoryYAxis.$, null]]);
    return VerticalAnchoredCategorySeries;
})();
//# sourceMappingURL=VerticalAnchoredCategorySeries.js.map
