"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.selectedChallengeHookAdapter = void 0;
const SelectedChallengePM_1 = require("../PMs/SelectedChallengePM");
exports.selectedChallengeHookAdapter = {
    defaultVM: SelectedChallengePM_1.defaultSelectedChallengeVM,
    subscribe: (appObjects, setVM) => {
        const pm = SelectedChallengePM_1.SelectedChallengePM.get(appObjects);
        if (!pm) {
            appObjects.submitError("inspectorTabAdapter", "Unable to find InspectorTabPM");
            return;
        }
        pm.addView(setVM);
    },
    unsubscribe: (appObjects, setVM) => {
        const pm = SelectedChallengePM_1.SelectedChallengePM.get(appObjects);
        if (!pm) {
            appObjects.submitError("inspectorTabAdapter", "Unable to find InspectorTabPM");
            return;
        }
        pm.removeView(setVM);
    },
};
//# sourceMappingURL=selectedChallengeHookAdapter.js.map