/*
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, NotSupportedException, typeCast, fromEnum, toEnum, markType } from "igniteui-angular-core";
import { IPackage_$type } from "./IPackage";
import { IPackagePartEx_$type } from "./IPackagePartEx";
import { CachedLoadPackagePartEx } from "./CachedLoadPackagePartEx";
import { CachedLoadPackagePart } from "./CachedLoadPackagePart";
/**
 * @hidden
 */
export class CachedLoadPackage extends Base {
    constructor(a, b) {
        super();
        this._a = null;
        this._c = false;
        this._a = a;
        this._c = b;
    }
    createPart(a, b) {
        throw new NotSupportedException(0);
    }
    createRelationship(a, b, c, d) {
        throw new NotSupportedException(0);
    }
    dispose() {
        if (this._c) {
            this._a.dispose();
        }
    }
    getPart(a) {
        return this._b(this._a.getPart(a));
    }
    _b(a) {
        let b = typeCast(IPackagePartEx_$type, a);
        if (b != null) {
            return new CachedLoadPackagePartEx(this, b);
        }
        return new CachedLoadPackagePart(this, a);
    }
    *_getParts() {
        for (let a of fromEnum(this._a.getParts())) {
            yield this._b(a);
        }
    }
    getParts() {
        return toEnum(() => this._getParts());
    }
    getRelationship(a) {
        return this._a.getRelationship(a);
    }
    getRelationships() {
        return this._a.getRelationships();
    }
    partExists(a) {
        return this._a.partExists(a);
    }
}
CachedLoadPackage.$t = markType(CachedLoadPackage, 'CachedLoadPackage', Base.$, [IPackage_$type]);
//# sourceMappingURL=CachedLoadPackage.js.map