/*
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, String_$type, fromEnum, markType } from "igniteui-angular-core";
import { IPackagePart_$type } from "./IPackagePart";
import { IPackageRelationship_$type } from "./IPackageRelationship";
import { Dictionary$2 } from "igniteui-angular-core";
/**
 * @hidden
 */
export let CachedLoadPackagePart = /*@__PURE__*/ (() => {
    class CachedLoadPackagePart extends Base {
        constructor(a, b) {
            super();
            this.a = null;
            this.b = null;
            this.c = null;
            this.a = a;
            this.b = b;
        }
        get $package() {
            return this.a;
        }
        get uri() {
            return this.b.uri;
        }
        get contentType() {
            return this.b.contentType;
        }
        createRelationship(a, b, c, d) {
            throw new NotSupportedException(0);
        }
        getRelationship(a) {
            if (this.c == null) {
                this.d();
            }
            return this.c.item(a);
        }
        getRelationships() {
            if (this.c == null) {
                this.d();
            }
            return this.c.values;
        }
        getStream(a, b) {
            return this.b.getStream(a, b);
        }
        d() {
            this.c = new Dictionary$2(String_$type, IPackageRelationship_$type, 0);
            for (let a of fromEnum(this.b.getRelationships())) {
                this.c.item(a.id, a);
            }
        }
    }
    CachedLoadPackagePart.$t = markType(CachedLoadPackagePart, 'CachedLoadPackagePart', Base.$, [IPackagePart_$type]);
    return CachedLoadPackagePart;
})();
