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