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