import { AppObjectPM } from "@vived/core";
import { BabylonEntity } from "../Entities/BabylonEntity";
export class ShowBabylonInspectorPM extends AppObjectPM {
    vmsAreEqual(a, b) {
        return a === b;
    }
    constructor(appObject) {
        super(appObject, ShowBabylonInspectorPM.type);
        this.onBabylonChange = () => {
            if (!this.babylon)
                return;
            this.doUpdateView(this.babylon.showInspector);
        };
        this.babylon = appObject.getComponent(BabylonEntity.type);
        if (!this.babylon) {
            this.warn("ShowBabylonInspectorPM has been added to something without a BabylonEntity");
            return;
        }
        this.babylon.addChangeObserver(this.onBabylonChange);
        this.onBabylonChange();
    }
}
ShowBabylonInspectorPM.type = "ShowBabylonInspectorPM";
//# sourceMappingURL=ShowBabylonInspectorPM.js.map