import { SelectedObjectPM } from "../PM/SelectedObjectPM";
export const selectedObjectAdapter = {
    defaultVM: null,
    subscribe: (appObjects, setVM) => {
        const pm = SelectedObjectPM.get(appObjects);
        if (!pm) {
            appObjects.submitError("selectedObjectAdapter", "Unable to find SelectedObjectPM");
            return;
        }
        pm.addView(setVM);
    },
    unsubscribe: (appObjects, setVM) => {
        const pm = SelectedObjectPM.get(appObjects);
        if (!pm) {
            appObjects.submitError("selectedObjectAdapter", "Unable to find SelectedObjectPM");
            return;
        }
        pm.removeView(setVM);
    },
};
//# sourceMappingURL=selectedObjectAdapter.js.map