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