"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.enablementAdapter = void 0;
const EnabledStatePM_1 = require("../PM/EnabledStatePM");
exports.enablementAdapter = {
    defaultVM: false,
    subscribe: (id, appObjects, setVM) => {
        const pm = EnabledStatePM_1.EnabledStatePM.get(id, appObjects);
        if (!pm) {
            appObjects.submitError("enablementAdapter", "Unable to find PM");
            return;
        }
        pm.addView(setVM);
    },
    unsubscribe: (id, appObjects, setVM) => {
        const pm = EnabledStatePM_1.EnabledStatePM.get(id, appObjects);
        if (!pm) {
            appObjects.submitError("enablementAdapter", "Unable to find PM");
            return;
        }
        pm.removeView(setVM);
    },
};
//# sourceMappingURL=enablementAdapter.js.map