/*
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 { FinancialBucketCalculator } from "./FinancialBucketCalculator";
import { markType } from "igniteui-react-core";
/**
 * @hidden
 */
var FinancialPriceBucketCalculator = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(FinancialPriceBucketCalculator, _super);
    function FinancialPriceBucketCalculator(a) {
        return _super.call(this, a) || this;
    }
    FinancialPriceBucketCalculator.prototype.getBucket = function (a) {
        var b = a * this.b;
        var c = Math.min(b + this.b - 1, this.a.bz.cd.count - 1);
        if (b <= c && b >= 0 && c >= 0) {
            var d = this.a.bz.pc.item(b);
            var e = Number.NEGATIVE_INFINITY;
            var f = Number.POSITIVE_INFINITY;
            var g = this.a.bz.o9.item(c);
            for (var h = b; h <= c; ++h) {
                e = Math.max(e, this.a.bz.pa.item(h));
                f = Math.min(f, this.a.bz.pb.item(h));
            }
            f = Math.min(d, f);
            e = Math.max(g, e);
            return [0.5 * (b + c), d, e, f, g];
        }
        return [NaN, NaN, NaN, NaN, NaN];
    };
    FinancialPriceBucketCalculator.$t = markType(FinancialPriceBucketCalculator, 'FinancialPriceBucketCalculator', FinancialBucketCalculator.$);
    return FinancialPriceBucketCalculator;
}(FinancialBucketCalculator));
export { FinancialPriceBucketCalculator };
//# sourceMappingURL=FinancialPriceBucketCalculator.js.map
