/*
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 { __extends } from "tslib";
import { List$1 } from "igniteui-angular-core";
import { SliceInfo } from "./SliceInfo";
import { markType } from "igniteui-angular-core";
/**
 * @hidden
 */
var SliceInfoList = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(SliceInfoList, _super);
    function SliceInfoList() {
        return _super.call(this, SliceInfo.$, 0) || this;
    }
    SliceInfoList.prototype.ae = function () {
        this.aa(function (a, b) {
            if (a.j < b.j) {
                return -1;
            }
            if (a.j > b.j) {
                return 1;
            }
            return 0;
        });
    };
    SliceInfoList.prototype.af = function () {
        this.aa(function (a, b) {
            if (a.b.aq.y < b.b.aq.y) {
                return -1;
            }
            if (a.b.aq.y > b.b.aq.y) {
                return 1;
            }
            return 0;
        });
    };
    SliceInfoList.prototype.ad = function (a) {
        this.af();
        var b = this.ac(function (c) {
            if (a < (c.b.ar.y + c.b.aq.y)) {
                return -1;
            }
            if (a > (c.b.ao.y + c.b.aq.y)) {
                return 1;
            }
            else {
                return 0;
            }
        });
        if (b >= 0) {
            b = (this._inner[b]).j;
        }
        else {
            b = -1;
        }
        this.ae();
        if (b >= 0) {
            return b;
        }
        return -1;
    };
    SliceInfoList.prototype.ac = function (a) {
        var b = 0;
        var c = this.count - 1;
        while (b <= c) {
            var d = (b + ((c - b) >> 1));
            var e = a(this._inner[d]);
            if (e < 0) {
                c = d - 1;
            }
            else if (e > 0) {
                b = d + 1;
            }
            else {
                return d;
            }
        }
        return ~b;
    };
    SliceInfoList.$t = markType(SliceInfoList, 'SliceInfoList', List$1.$.specialize(SliceInfo.$));
    return SliceInfoList;
}(List$1));
export { SliceInfoList };
