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