"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.questionAnswerAdapter = void 0;
const QuestionAnswerPM_1 = require("../PM/QuestionAnswerPM");
exports.questionAnswerAdapter = {
    defaultVM: QuestionAnswerPM_1.defaultQuestionChallengeAnswerVM,
    subscribe: (id, appObjects, setVM) => {
        if (!id)
            return;
        const pm = QuestionAnswerPM_1.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_1.QuestionAnswerPM.getByID(id, appObjects);
        if (!pm) {
            appObjects.submitError("questionAnswerAdapter", "Unable to find QuestionAnswerPM");
            return;
        }
        pm.removeView(setVM);
    },
};
//# sourceMappingURL=questionAnswerAdapter.js.map