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