/*
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 { IHorizontalAnchoredCategorySeriesInteractionManager_$type } from "./IHorizontalAnchoredCategorySeriesInteractionManager";
import { DVContainer } from "igniteui-react-core";
import { runOn, Point_$type, typeCast, EnumUtil, enumGetBox, markType, markDep } from "igniteui-react-core";
import { CategoryAxisBase } from "./CategoryAxisBase";
import { DependencyProperty } from "igniteui-react-core";
import { NumericYAxis } from "./NumericYAxis";
import { CategoryMode_$type } from "./CategoryMode";
import { Rect } from "igniteui-react-core";
import { ScalerParams } from "./ScalerParams";
import { Axis } from "./Axis";
import { TrendLineType_$type } from "igniteui-react-core";
import { CategoryTrendLineManagerFactory } from "./CategoryTrendLineManagerFactory";
import { ISortingAxis_$type } from "./ISortingAxis";
import { CategoryXAxis } from "./CategoryXAxis";
import { PropertyMetadata } from "igniteui-react-core";
/**
 * @hidden
 */
export let HorizontalAnchoredCategorySeries = /*@__PURE__*/ (() => {
    class HorizontalAnchoredCategorySeries extends AnchoredCategorySeries {
        constructor() {
            super(...arguments);
            this.qf = null;
            this.qb = null;
            this.qh = null;
            this.qd = 0;
        }
        get qg() {
            if (this.qf == null) {
                this.qf = DVContainer.instance.createInstance(IHorizontalAnchoredCategorySeriesInteractionManager_$type, () => this.b2.n);
            }
            return this.qf;
        }
        h1() {
            super.h1();
            this.xAxis = null;
            this.yAxis = null;
        }
        bd() {
            if (this.be == 0) {
                return 1;
            }
            else {
                return super.bd();
            }
        }
        nj() {
            return this.qb;
        }
        n3() {
            return this.qh;
        }
        l6(a) {
            if (this.nk == null || this.nk.m.count == 0 || !this.hasMarkers || !this.md()) {
                return Rect.empty;
            }
            return this.qg.d$d(this, this.nk.m, a, runOn(this, this.qt));
        }
        qt(a) {
            return this.pb.c5(a);
        }
        ql(a, b, c) {
            return this.qg.d$c(this, this.n3(), a, b, c);
        }
        ah(a) {
            return this.qg.d$a(this, this.nk.f, this.ok(this.bi), this.ol(this.bi), a);
        }
        ai(a) {
            return this.qg.d$b(this, this.nk.f, this.ok(this.bi), this.ol(this.bi), a);
        }
        dh(a, b) {
            if (this.dg(a, b)) {
                return true;
            }
            if (this.me(a, b)) {
                return true;
            }
            return false;
        }
        getOffsetValue() {
            return this.no.r(this.nj(), this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi));
        }
        getCategoryWidth() {
            let a = this.getEffectiveViewport1(this.bi);
            return this.nj().getCategorySize(this.bi.bs, this.bi.br, a);
        }
        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);
        }
        fe(a, b) {
            return this.ff(a, b, this.nj(), runOn(this, this.oi), this.valueColumn);
        }
        fc(a, b) {
            return this.fd(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.nj(), d, e, this.valueColumn.count, runOn(this, this.oi));
        }
        lv(a, b, c) {
            if (this.nj() == null || this.n3() == null) {
                return { $type: Point_$type, x: NaN, y: NaN };
            }
            return this.lx(a, b, c, this.no.r(this.nj(), this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi)), this.n3(), this.nj(), null, null, null);
        }
        fetchXAxis() {
            return this.qb;
        }
        fetchYAxis() {
            return this.qh;
        }
        pt(a) {
            this.xAxis = typeCast(CategoryAxisBase.$, a);
        }
        pu(a) {
            this.yAxis = typeCast(NumericYAxis.$, a);
        }
        oe() {
            return this.qh != null && this.qh.cn();
        }
        qp(a) {
            this.qb = a;
        }
        qq(a) {
            this.qh = a;
        }
        nd(a, b) {
            return this.o8(a, b, this.qb);
        }
        i7(a, b, c, d) {
            switch (b) {
                case HorizontalAnchoredCategorySeries.$$p[0]:
                    this.qp(this.xAxis);
                    if (this.pb.cz) {
                        this.pb.cy = CategoryTrendLineManagerFactory.a(this.pb.cy, this.qb, this.j5, this, this.b2);
                    }
                    break;
                case "TrendLineType":
                    let e = EnumUtil.getEnumValue(TrendLineType_$type, d);
                    if (e != 0) {
                        this.pb.cy = CategoryTrendLineManagerFactory.a(this.pb.cy, this.qb, this.j5, this, this.b2);
                    }
                    break;
            }
            super.i7(a, b, c, d);
            switch (b) {
                case HorizontalAnchoredCategorySeries.$$p[0]:
                    if (c != d) {
                        this.h7(typeCast(Axis.$, c));
                        this.jc(typeCast(Axis.$, d));
                        this.qp(this.xAxis);
                        this.ns.cn.g(this.eu);
                        this.jl(false);
                        this.it();
                    }
                    break;
                case HorizontalAnchoredCategorySeries.$$p[1]:
                    if (c != d) {
                        this.h7(typeCast(Axis.$, c));
                        this.jc(typeCast(Axis.$, d));
                        this.qq(this.yAxis);
                        this.ns.cn.g(this.eu);
                        this.oe();
                        this.jl(false);
                        this.it();
                    }
                    break;
                case "CategoryMode":
                    if (this.xAxis != null) {
                        this.xAxis.kv(true);
                    }
                    break;
            }
        }
        h6(a, b, c, d) {
            super.h6(a, b, c, d);
            if (this.qb != null && typeCast(ISortingAxis_$type, this.qb) !== null) {
                this.qb.i$i();
            }
            switch (a) {
                case 4:
                    if (this.qb != null) {
                        this.qb.cn();
                    }
                    if (this.qh != null && !this.qh.cn()) {
                        this.jl(true);
                    }
                    break;
                case 1:
                    if (this.qb != null) {
                        this.qb.cn();
                    }
                    if (this.qh != null && !this.qh.cn()) {
                        this.jl(true);
                    }
                    break;
                case 0:
                    if (this.qb != null) {
                        this.qb.cn();
                    }
                    if (this.qh != null && !this.qh.cn()) {
                        this.jl(true);
                    }
                    break;
                case 2:
                    if (this.pm != null && this.pb.cn.d > 0 && this.qh != null && !this.qh.cn()) {
                        this.jl(true);
                    }
                    break;
                case 3:
                    if (d == this.pm) {
                        if (this.qb != null) {
                            this.qb.cn();
                        }
                        if (this.qh != null && !this.qh.cn()) {
                            this.jl(true);
                        }
                    }
                    break;
            }
        }
        qj(a) {
            if (typeCast(CategoryXAxis.$, a) !== null || a.b7) {
                return true;
            }
            return false;
        }
        qk(a) {
            if (typeCast(NumericYAxis.$, a) !== null) {
                return true;
            }
            return false;
        }
        get qe() {
            return this.qd;
        }
        set qe(a) {
            let b = this.qe;
            if (a != b) {
                this.qd = a;
                this.raisePropertyChanged("CategoryMode", enumGetBox(CategoryMode_$type, b), enumGetBox(CategoryMode_$type, this.qe));
            }
        }
        get useHighMarkerFidelity() {
            return this.of;
        }
    }
    HorizontalAnchoredCategorySeries.$t = /*@__PURE__*/ markType(HorizontalAnchoredCategorySeries, 'HorizontalAnchoredCategorySeries', AnchoredCategorySeries.$);
    HorizontalAnchoredCategorySeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, HorizontalAnchoredCategorySeries, 'raisePropertyChanged', ['XAxis::qr', [CategoryAxisBase.$, null], 'YAxis::qs', [NumericYAxis.$, null]]);
    return HorizontalAnchoredCategorySeries;
})();
//# sourceMappingURL=HorizontalAnchoredCategorySeries.js.map
