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