/*
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, Boolean_$type, markType } from "igniteui-angular-core";
import { WorkItem } from "./WorkItem";
import { StructuredStorageManager } from "./StructuredStorageManager";
import { Async } from "./Async";
import { WorkItemExtensions } from "./WorkItemExtensions";
/**
 * @hidden
 */
var OleDataSpaces = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(OleDataSpaces, _super);
    function OleDataSpaces() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    OleDataSpaces.a = function (a, b, c, d) {
        switch (b) {
            default: return null;
        }
    };
    OleDataSpaces.c = function (a) {
        return a._ac("EncryptionInfo") != null && a._ac("EncryptedPackage") != null;
    };
    OleDataSpaces.b = function (a, b, c, d, e) {
        if (StructuredStorageManager._j(a) == false) {
            return WorkItem.g(Boolean_$type, false);
        }
        var f = a.position;
        return WorkItemExtensions.k(Boolean_$type, Boolean_$type, Async.p(StructuredStorageManager.$, Boolean_$type, new StructuredStorageManager(a, true), function (g) {
            {
                var h = g._ac("EncryptionInfo");
                try {
                    if (h != null) {
                        d();
                    }
                }
                finally {
                    if (h != null) {
                        h.dispose();
                    }
                }
            }
            return WorkItem.g(Boolean_$type, false);
        }), function (g) {
            if (WorkItemExtensions.m(Boolean_$type, g)) {
                return true;
            }
            a.position = f;
            return false;
        });
    };
    OleDataSpaces.$t = markType(OleDataSpaces, 'OleDataSpaces');
    return OleDataSpaces;
}(Base));
export { OleDataSpaces };
