/*
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 * as tslib_1 from "tslib";
import { Base, Stream, typeCast, markType } from "igniteui-angular-core";
import { IPackageFactory_$type } from "./IPackageFactory";
import { Package } from "./Package";
import { MemoryStream } from "igniteui-angular-core";
import { b64toUint8Array } from "igniteui-angular-core";
/**
 * @hidden
 */
var PackageFactory = /** @class */ (function (_super) {
    tslib_1.__extends(PackageFactory, _super);
    function PackageFactory() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    PackageFactory.prototype.open = function (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);
    };
    PackageFactory.prototype._open$i = function (a, b) {
        return Package._d(a, b);
    };
    PackageFactory.$t = markType(PackageFactory, 'PackageFactory', Base.$, [IPackageFactory_$type]);
    return PackageFactory;
}(Base));
export { PackageFactory };
//# sourceMappingURL=PackageFactory.js.map