/*
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.so = null;
        }
        ji() {
            super.ji();
            this.xAxis = null;
            this.yAxis = null;
        }
        get sp() {
            if (this.so == null) {
                this.so = DVContainer.instance.createInstance(IVerticalAnchoredCategorySeriesInteractionManager_$type, () => this.cg.n);
            }
            return this.so;
        }
        get_isVertical() {
            return true;
        }
        pu() {
            return this.yAxis;
        }
        qe() {
            return this.xAxis;
        }
        getOffsetValue() {
            return this.pz.r(this.pu(), this.bs.bv, this.bs.bu, this.getEffectiveViewport1(this.bs));
        }
        getCategoryWidth() {
            return this.yAxis.getCategorySize(this.bs.bv, this.bs.bu, this.getEffectiveViewport1(this.bs));
        }
        gd(a, b) {
            return this.ge(a, b, this.pu(), runOn(this, this.qs), this.valueColumn);
        }
        gf(a, b) {
            return this.gg(a, b, this.pu(), runOn(this, this.qs), this.valueColumn);
        }
        e2(a, b, c, d, e) {
            if (this.valueColumn == null) {
                return Number.POSITIVE_INFINITY;
            }
            return this.e3(a, b, this.yAxis, d, e, this.valueColumn.count, runOn(this, this.qs));
        }
        bj() {
            if (this.bk == 0) {
                return 1;
            }
            else {
                return super.bj();
            }
        }
        n4(a) {
            if (!this.hasMarkers || !this.ok()) {
                return Rect.empty;
            }
            return this.sp.e$b(this, this.pv.m, a, runOn(this, this.sx));
        }
        sx(a) {
            return this.rm.c9(a);
        }
        dy(a, b) {
            if (this.dx(a, b)) {
                return true;
            }
            if (this.ol(a, b)) {
                return true;
            }
            return false;
        }
        fh(a, b, c) {
            if (this.b6 == null) {
                return NaN;
            }
            let d = this.getEffectiveViewport1(this.bs);
            let e = this.pu();
            let f = new ScalerParams(0, this.b6.os, this.bs.bu, e.ca, d);
            let g = this.pz.r(e, this.b6.os, this.bs.bu, d);
            return this.fj(this.valueColumn, a, e, f, g, runOn(this, this.qs), b, c);
        }
        nt(a, b, c) {
            let d = this.pu();
            return this.nv(a, b, c, this.pz.r(d, this.bs.bv, this.bs.bu, this.getEffectiveViewport1(this.bs)), this.qe(), d, null, null, null);
        }
        fetchXAxis() {
            return this.xAxis;
        }
        fetchYAxis() {
            return this.yAxis;
        }
        r5(a) {
            this.xAxis = typeCast(NumericXAxis.$, a);
        }
        r6(a) {
            this.yAxis = typeCast(CategoryYAxis.$, a);
        }
        qo() {
            return this.xAxis != null && this.xAxis.cn();
        }
        po(a, b) {
            return this.rj(a, b, this.yAxis);
        }
        e4(a) {
            return this.sp.e$a(this, a);
        }
        qs(a) {
            return this.e6(a, this.pu());
        }
        f9(a) {
            return truncate(Math.round(this.e4(a)));
        }
        gq(a) {
            let b = this.f9(a);
            return b >= 0 && this.cd != null && b < this.cd.count ? this.cd.item(b) : null;
        }
        kp(a, b, c, d) {
            super.kp(a, b, c, d);
            switch (b) {
                case VerticalAnchoredCategorySeries.$$p[0]:
                    if (c != d) {
                        this.jp(typeCast(Axis.$, c));
                        this.ku(typeCast(Axis.$, d));
                        this.p3.cr.g(this.fq);
                        this.k3(false);
                        this.ka();
                    }
                    break;
                case VerticalAnchoredCategorySeries.$$p[1]:
                    if (c != d) {
                        this.jp(typeCast(Axis.$, c));
                        this.ku(typeCast(Axis.$, d));
                        this.p3.cr.g(this.fq);
                        this.qo();
                        this.k3(false);
                        this.ka();
                    }
                    break;
                case "TrendLineType":
                    let e = EnumUtil.getEnumValue(TrendLineType_$type, d);
                    if (e != 0) {
                        this.rm.c2 = CategoryTrendLineManagerFactory.a(this.rm.c2, this.yAxis, this.ls, this, this.cg);
                    }
                    break;
            }
        }
        ss(a) {
            if (typeCast(CategoryYAxis.$, a) !== null) {
                return true;
            }
            return false;
        }
        sr(a) {
            if (typeCast(NumericXAxis.$, a) !== null) {
                return true;
            }
            return false;
        }
        get useHighMarkerFidelity() {
            return this.qp;
        }
    }
    VerticalAnchoredCategorySeries.$t = /*@__PURE__*/ markType(VerticalAnchoredCategorySeries, 'VerticalAnchoredCategorySeries', AnchoredCategorySeries.$);
    VerticalAnchoredCategorySeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, VerticalAnchoredCategorySeries, 'raisePropertyChanged', ['XAxis::sv', [NumericXAxis.$, null], 'YAxis::sw', [CategoryYAxis.$, null]]);
    return VerticalAnchoredCategorySeries;
})();
//# sourceMappingURL=VerticalAnchoredCategorySeries.js.map
