/*
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 { Base, Number_$type, markType } from "igniteui-angular-core";
import { List$1 } from "igniteui-angular-core";
import { WorksheetCellFormatData } from "./WorksheetCellFormatData";
/**
 * @hidden
 */
var MultipleCellValueInfo = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(MultipleCellValueInfo, _super);
    function MultipleCellValueInfo(a, b, c, d, e) {
        var _this = _super.call(this) || this;
        _this.e = null;
        _this.a = null;
        _this.g = null;
        _this.h = null;
        _this.i = null;
        _this.e = a;
        _this.a = b;
        _this.g = c;
        _this.h = d;
        _this.i = e;
        return _this;
    }
    MultipleCellValueInfo.prototype.d = function (a) {
        return this.g._inner[a];
    };
    MultipleCellValueInfo.c = function (a, b, c) {
        return a._a8(b) || c;
    };
    MultipleCellValueInfo.f = function (a, b, c, d, e) {
        c = null;
        d = null;
        e = null;
        var f = a._r.b;
        var g;
        if (((function () { var h = b(a, f, a._q, g); g = h.p3; return h.ret; })()) == false) {
            return {
                ret: false,
                p2: c,
                p3: d,
                p4: e
            };
        }
        var h = f.worksheet.workbook;
        var i;
        if (f._hasCellFormat) {
            i = f._cellFormatInternal.d;
        }
        else {
            i = h._ca._p;
        }
        c = new List$1(WorksheetCellFormatData.$, 0);
        d = new List$1(Number_$type, 0);
        e = new List$1(Base.$, 0);
        var j = a._q.r;
        c.add(MultipleCellValueInfo.c(f, j, i));
        d.add(j);
        e.add1(g);
        var k = h._ff;
        var _loop_1 = function (l) {
            var m = f._am(l);
            if (m == null) {
                return "break";
            }
            if (((function () { var n = b(a, f, m, g); g = n.p3; return n.ret; })()) == false) {
                return "break";
            }
            c.add(MultipleCellValueInfo.c(f, l, i));
            d.add(l);
            e.add1(g);
        };
        for (var l = (j + 1); l < k; l++) {
            var state_1 = _loop_1(l);
            if (state_1 === "break")
                break;
        }
        return {
            ret: d.count >= 2,
            p2: c,
            p3: d,
            p4: e
        };
    };
    MultipleCellValueInfo.prototype.n = function (a) {
        return this.i._inner[a];
    };
    Object.defineProperty(MultipleCellValueInfo.prototype, "j", {
        get: function () {
            return this.h._inner[0];
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MultipleCellValueInfo.prototype, "k", {
        get: function () {
            return this.h._inner[this.h.count - 1];
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MultipleCellValueInfo.prototype, "l", {
        get: function () {
            return this.h.count;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MultipleCellValueInfo.prototype, "b", {
        get: function () {
            return this.a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(MultipleCellValueInfo.prototype, "m", {
        get: function () {
            return this.e.index;
        },
        enumerable: false,
        configurable: true
    });
    MultipleCellValueInfo.$t = markType(MultipleCellValueInfo, 'MultipleCellValueInfo');
    return MultipleCellValueInfo;
}(Base));
export { MultipleCellValueInfo };
