/*
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, Stream, typeCast, markType, TypeRegistrar } from "igniteui-webcomponents-core";
import { IPackageFactory_$type } from "igniteui-webcomponents-excel";
import { IGExcelSerializationProvider_SyncZipFile } from "./IGExcelSerializationProvider_SyncZipFile";
import { MemoryStream } from "igniteui-webcomponents-core";
import { b64toUint8Array } from "igniteui-webcomponents-core";
/**
 * @hidden
 */
export let IGExcelSerializationProvider_SyncPackageFactory = /*@__PURE__*/ (() => {
    class IGExcelSerializationProvider_SyncPackageFactory extends Base {
        open(stream, packageMode) {
            arguments[0] = (typeof arguments[0] === 'string' ? b64toUint8Array(arguments[0]) : arguments[0]);
            arguments[0] = (typeCast(Stream.$, arguments[0]) ? arguments[0] : new MemoryStream(2, arguments[0]));
            return this._open$i.apply(this, arguments);
        }
        _open$i(a, b) {
            let c = TypeRegistrar.get("Package");
            let d = ((c.createUsingFile || c._createUsingFile)(a, b, new IGExcelSerializationProvider_SyncZipFile()));
            return d;
        }
    }
    IGExcelSerializationProvider_SyncPackageFactory.$t = /*@__PURE__*/ markType(IGExcelSerializationProvider_SyncPackageFactory, 'IGExcelSerializationProvider_SyncPackageFactory', Base.$, [IPackageFactory_$type]);
    return IGExcelSerializationProvider_SyncPackageFactory;
})();
//# sourceMappingURL=IGExcelSerializationProvider_SyncPackageFactory.js.map
