"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.toolAdapter = void 0;
const ToolPM_1 = require("../PM/ToolPM");
exports.toolAdapter = {
    defaultVM: ToolPM_1.defaultToolVM,
    subscribe: (id, appObjects, setVM) => {
        if (!id)
            return;
        const pm = ToolPM_1.ToolPM.get(id, appObjects);
        if (!pm) {
            appObjects.submitError("toolAdapter", "Unable to find ToolPM for " + id);
            return;
        }
        pm.addView(setVM);
    },
    unsubscribe: (id, appObjects, setVM) => {
        ToolPM_1.ToolPM.get(id, appObjects)?.removeView(setVM);
    },
};
//# sourceMappingURL=toolAdapter.js.map