import { ToolPM, defaultToolVM } from "../PM/ToolPM";
export const toolAdapter = {
    defaultVM: defaultToolVM,
    subscribe: (id, appObjects, setVM) => {
        if (!id)
            return;
        const pm = ToolPM.get(id, appObjects);
        if (!pm) {
            appObjects.submitError("toolAdapter", "Unable to find ToolPM for " + id);
            return;
        }
        pm.addView(setVM);
    },
    unsubscribe: (id, appObjects, setVM) => {
        ToolPM.get(id, appObjects)?.removeView(setVM);
    },
};
//# sourceMappingURL=toolAdapter.js.map