import { AppObjectEntity, MemoizedBoolean, } from "@vived/core";
export class Transparency extends AppObjectEntity {
    static addIfMissing(appObj) {
        const existing = appObj.getComponent(this.type);
        if (existing) {
            return existing;
        }
        else {
            return new Transparency(appObj);
        }
    }
    static get(appObjID, appObjects) {
        const appObj = appObjects.get(appObjID);
        if (appObj === undefined) {
            return undefined;
        }
        return appObj.getComponent(Transparency.type);
    }
    get isTransparent() {
        return this.memoizedIsTransparent.val;
    }
    set isTransparent(val) {
        this.memoizedIsTransparent.val = val;
    }
    constructor(appObject) {
        super(appObject, Transparency.type);
        this.memoizedIsTransparent = new MemoizedBoolean(false, this.notifyOnChange);
    }
}
Transparency.type = "Transparency";
//# sourceMappingURL=Transparency.js.map