"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Transparency = void 0;
const core_1 = require("@vived/core");
class Transparency extends core_1.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 core_1.MemoizedBoolean(false, this.notifyOnChange);
    }
}
exports.Transparency = Transparency;
Transparency.type = "Transparency";
//# sourceMappingURL=Transparency.js.map