import { AppObjectPM, getSingletonComponent, } from "@vived/core";
import { BaseAppState } from "../Entity";
export class SlideTextPM extends AppObjectPM {
}
SlideTextPM.type = "SlideTextPM";
SlideTextPM.get = (appObjects) => getSingletonComponent(SlideTextPM.type, appObjects);
export function makeSlideTextPM(appObject) {
    return new SlideTextPMImp(appObject);
}
class SlideTextPMImp extends SlideTextPM {
    get baseAppState() {
        return this.getCachedSingleton(BaseAppState.type);
    }
    vmsAreEqual(a, b) {
        return a === b;
    }
    constructor(appObject) {
        super(appObject, SlideTextPM.type);
        this.onAppStateChange = () => {
            if (!this.baseAppState)
                return;
            this.doUpdateView(this.baseAppState.slideText);
        };
        this.baseAppState?.addChangeObserver(this.onAppStateChange);
        this.onAppStateChange();
        this.appObjects.registerSingleton(this);
    }
}
//# sourceMappingURL=SlideTextPM.js.map