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