/*
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 { Base, Number_$type, markType } from "igniteui-angular-core";
import { List$1 } from "igniteui-angular-core";
import { WorksheetCellFormatData } from "./WorksheetCellFormatData";
/**
 * @hidden
 */
export let MultipleCellValueInfo = /*@__PURE__*/ (() => {
    class MultipleCellValueInfo extends Base {
        constructor(a, b, c, d, e) {
            super();
            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;
        }
        d(a) {
            return this.g._inner[a];
        }
        static c(a, b, c) {
            return a._a8(b) || c;
        }
        static f(a, b, c, d, e) {
            c = null;
            d = null;
            e = null;
            let f = a._r.b;
            let g;
            if (((() => { let h = b(a, f, a._q, g); g = h.p3; return h.ret; })()) == false) {
                return {
                    ret: false,
                    p2: c,
                    p3: d,
                    p4: e
                };
            }
            let h = f.worksheet.workbook;
            let 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);
            let j = a._q.r;
            c.add(MultipleCellValueInfo.c(f, j, i));
            d.add(j);
            e.add1(g);
            let k = h._ff;
            for (let l = (j + 1); l < k; l++) {
                let m = f._am(l);
                if (m == null) {
                    break;
                }
                if (((() => { let n = b(a, f, m, g); g = n.p3; return n.ret; })()) == false) {
                    break;
                }
                c.add(MultipleCellValueInfo.c(f, l, i));
                d.add(l);
                e.add1(g);
            }
            return {
                ret: d.count >= 2,
                p2: c,
                p3: d,
                p4: e
            };
        }
        n(a) {
            return this.i._inner[a];
        }
        get j() {
            return this.h._inner[0];
        }
        get k() {
            return this.h._inner[this.h.count - 1];
        }
        get l() {
            return this.h.count;
        }
        get b() {
            return this.a;
        }
        get m() {
            return this.e.index;
        }
    }
    MultipleCellValueInfo.$t = markType(MultipleCellValueInfo, 'MultipleCellValueInfo');
    return MultipleCellValueInfo;
})();
