/*
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 { FormulaTokenVisitor } from "./FormulaTokenVisitor";
import { markType } from "igniteui-angular-core";
import { stringIsNullOrEmpty } from "igniteui-angular-core";
import { tryParseInt32_1 } from "igniteui-angular-core";
/**
 * @hidden
 */
export class WorkbookLoadManagerExcel2007_UpdateIndexedWorkbookReferencesVisitor extends FormulaTokenVisitor {
    constructor() {
        super();
        this.az = null;
    }
    g() {
        this.az = null;
        super.g();
    }
    x(a) {
        let b = a.o;
        if (((() => { let c = this.a2(b); b = c.p0; return c.ret; })())) {
            a.o = b;
        }
    }
    static a1(a, b) {
        if (WorkbookLoadManagerExcel2007_UpdateIndexedWorkbookReferencesVisitor.a0 == null) {
            WorkbookLoadManagerExcel2007_UpdateIndexedWorkbookReferencesVisitor.a0 = new WorkbookLoadManagerExcel2007_UpdateIndexedWorkbookReferencesVisitor();
        }
        WorkbookLoadManagerExcel2007_UpdateIndexedWorkbookReferencesVisitor.a0.az = b;
        WorkbookLoadManagerExcel2007_UpdateIndexedWorkbookReferencesVisitor.a0.b = a;
        return WorkbookLoadManagerExcel2007_UpdateIndexedWorkbookReferencesVisitor.a0;
    }
    a2(a) {
        if (a == null || a.i || a.e == null || stringIsNullOrEmpty(a.e.x)) {
            return {
                ret: false,
                p0: a
            };
        }
        let b;
        if (((() => { let c = tryParseInt32_1(a.e.x, b); b = c.p1; return c.ret; })()) == false) {
            return {
                ret: false,
                p0: a
            };
        }
        if (b < 0 || this.az._i.count <= b) {
            return {
                ret: false,
                p0: a
            };
        }
        let c = this.az._i._inner[b];
        a = a.g(c);
        return {
            ret: true,
            p0: a
        };
    }
}
WorkbookLoadManagerExcel2007_UpdateIndexedWorkbookReferencesVisitor.$t = markType(WorkbookLoadManagerExcel2007_UpdateIndexedWorkbookReferencesVisitor, 'WorkbookLoadManagerExcel2007_UpdateIndexedWorkbookReferencesVisitor', FormulaTokenVisitor.$);
WorkbookLoadManagerExcel2007_UpdateIndexedWorkbookReferencesVisitor.a0 = null;
//# sourceMappingURL=WorkbookLoadManagerExcel2007_UpdateIndexedWorkbookReferencesVisitor.js.map