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