/*
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 { AnchoredCategorySeries } from "./AnchoredCategorySeries";
import { NumericXAxis } from "./NumericXAxis";
import { DependencyProperty } from "igniteui-angular-core";
import { CategoryYAxis } from "./CategoryYAxis";
import { IVerticalAnchoredCategorySeriesInteractionManager_$type } from "./IVerticalAnchoredCategorySeriesInteractionManager";
import { DVContainer } from "igniteui-angular-core";
import { runOn, typeCast, EnumUtil, markType, markDep } from "igniteui-angular-core";
import { Axis } from "./Axis";
import { ScalerParams } from "./ScalerParams";
import { Rect } from "igniteui-angular-core";
import { TrendLineType_$type } from "igniteui-angular-core";
import { CategoryTrendLineManagerFactory } from "./CategoryTrendLineManagerFactory";
import { PropertyMetadata } from "igniteui-angular-core";
import { truncate } from "igniteui-angular-core";
/**
 * @hidden
 */
var VerticalAnchoredCategorySeries = /** @class */ (function (_super) {
    tslib_1.__extends(VerticalAnchoredCategorySeries, _super);
    function VerticalAnchoredCategorySeries() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.pz = null;
        return _this;
    }
    VerticalAnchoredCategorySeries.prototype.ht = function () {
        _super.prototype.ht.call(this);
        this.xAxis = null;
        this.yAxis = null;
    };
    Object.defineProperty(VerticalAnchoredCategorySeries.prototype, "p0", {
        get: function () {
            var _this = this;
            if (this.pz == null) {
                this.pz = DVContainer.instance.createInstance(IVerticalAnchoredCategorySeriesInteractionManager_$type, function () { return _this.b2.n; });
            }
            return this.pz;
        },
        enumerable: true,
        configurable: true
    });
    VerticalAnchoredCategorySeries.prototype.get_isVertical = function () {
        return true;
    };
    VerticalAnchoredCategorySeries.prototype.m6 = function () {
        return this.yAxis;
    };
    VerticalAnchoredCategorySeries.prototype.nq = function () {
        return this.xAxis;
    };
    VerticalAnchoredCategorySeries.prototype.getOffsetValue = function () {
        return this.nb.r(this.m6(), this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi));
    };
    VerticalAnchoredCategorySeries.prototype.getCategoryWidth = function () {
        return this.yAxis.getCategorySize(this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi));
    };
    VerticalAnchoredCategorySeries.prototype.fc = function (a, b) {
        return this.fd(a, b, this.m6(), runOn(this, this.n5), this.valueColumn);
    };
    VerticalAnchoredCategorySeries.prototype.fe = function (a, b) {
        return this.ff(a, b, this.m6(), runOn(this, this.n5), this.valueColumn);
    };
    VerticalAnchoredCategorySeries.prototype.d9 = function (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.n5));
    };
    VerticalAnchoredCategorySeries.prototype.bd = function () {
        if (this.be == 0) {
            return 1;
        }
        else {
            return _super.prototype.bd.call(this);
        }
    };
    VerticalAnchoredCategorySeries.prototype.lw = function (a) {
        if (!this.hasMarkers || !this.l3()) {
            return Rect.empty;
        }
        return this.p0.e$b(this, this.m7.m, a, runOn(this, this.p8));
    };
    VerticalAnchoredCategorySeries.prototype.p8 = function (a) {
        return this.oy.c5(a);
    };
    VerticalAnchoredCategorySeries.prototype.dh = function (a, b) {
        if (this.dg(a, b)) {
            return true;
        }
        if (this.l4(a, b)) {
            return true;
        }
        return false;
    };
    VerticalAnchoredCategorySeries.prototype.en = function (a, b, c) {
        if (this.bs == null) {
            return NaN;
        }
        var d = this.getEffectiveViewport1(this.bi);
        var e = this.m6();
        var f = new ScalerParams(0, this.bs.mq, this.bi.br, e.b8, d);
        var g = this.nb.r(e, this.bs.mq, this.bi.br, d);
        return this.ep(this.valueColumn, a, e, f, g, runOn(this, this.n5), b, c);
    };
    VerticalAnchoredCategorySeries.prototype.ll = function (a, b, c) {
        var d = this.m6();
        return this.ln(a, b, c, this.nb.r(d, this.bi.bs, this.bi.br, this.getEffectiveViewport1(this.bi)), this.nq(), d, null, null, null);
    };
    VerticalAnchoredCategorySeries.prototype.fetchXAxis = function () {
        return this.xAxis;
    };
    VerticalAnchoredCategorySeries.prototype.fetchYAxis = function () {
        return this.yAxis;
    };
    VerticalAnchoredCategorySeries.prototype.pg = function (a) {
        this.xAxis = typeCast(NumericXAxis.$, a);
    };
    VerticalAnchoredCategorySeries.prototype.ph = function (a) {
        this.yAxis = typeCast(CategoryYAxis.$, a);
    };
    VerticalAnchoredCategorySeries.prototype.n1 = function () {
        return this.xAxis != null && this.xAxis.cl();
    };
    VerticalAnchoredCategorySeries.prototype.m0 = function (a, b) {
        return this.ov(a, b, this.yAxis);
    };
    VerticalAnchoredCategorySeries.prototype.eb = function (a) {
        return this.p0.e$a(this, a);
    };
    VerticalAnchoredCategorySeries.prototype.n5 = function (a) {
        return this.ed(a, this.m6());
    };
    VerticalAnchoredCategorySeries.prototype.e8 = function (a) {
        return truncate(Math.round(this.eb(a)));
    };
    VerticalAnchoredCategorySeries.prototype.fp = function (a) {
        var b = this.e8(a);
        return b >= 0 && this.bz != null && b < this.bz.count ? this.bz.item(b) : null;
    };
    VerticalAnchoredCategorySeries.prototype.iz = function (a, b, c, d) {
        _super.prototype.iz.call(this, a, b, c, d);
        switch (b) {
            case VerticalAnchoredCategorySeries.$$p[0]:
                if (c != d) {
                    this.hz(typeCast(Axis.$, c));
                    this.i4(typeCast(Axis.$, d));
                    this.nf.cn.g(this.eu);
                    this.jd(false);
                    this.ik();
                }
                break;
            case VerticalAnchoredCategorySeries.$$p[1]:
                if (c != d) {
                    this.hz(typeCast(Axis.$, c));
                    this.i4(typeCast(Axis.$, d));
                    this.nf.cn.g(this.eu);
                    this.n1();
                    this.jd(false);
                    this.ik();
                }
                break;
            case "TrendLineType":
                var e = EnumUtil.getEnumValue(TrendLineType_$type, d);
                if (e != 0) {
                    this.oy.cy = CategoryTrendLineManagerFactory.a(this.oy.cy, this.yAxis, this.jx, this, this.b2);
                }
                break;
        }
    };
    VerticalAnchoredCategorySeries.prototype.p3 = function (a) {
        if (typeCast(CategoryYAxis.$, a) !== null) {
            return true;
        }
        return false;
    };
    VerticalAnchoredCategorySeries.prototype.p2 = function (a) {
        if (typeCast(NumericXAxis.$, a) !== null) {
            return true;
        }
        return false;
    };
    Object.defineProperty(VerticalAnchoredCategorySeries.prototype, "useHighMarkerFidelity", {
        get: function () {
            return this.n2;
        },
        enumerable: true,
        configurable: true
    });
    VerticalAnchoredCategorySeries.$t = markType(VerticalAnchoredCategorySeries, 'VerticalAnchoredCategorySeries', AnchoredCategorySeries.$);
    VerticalAnchoredCategorySeries.$$p = markDep(DependencyProperty, PropertyMetadata, VerticalAnchoredCategorySeries, 'raisePropertyChanged', ['XAxis::p6', [NumericXAxis.$, null], 'YAxis::p7', [CategoryYAxis.$, null]]);
    return VerticalAnchoredCategorySeries;
}(AnchoredCategorySeries));
export { VerticalAnchoredCategorySeries };
//# sourceMappingURL=VerticalAnchoredCategorySeries.js.map