"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.labelAdapter = void 0;
const LabelPM_1 = require("../PM/LabelPM");
exports.labelAdapter = {
    defaultVM: LabelPM_1.defaultLabelVM,
    subscribe: (id, appObjects, setVM) => {
        if (!id)
            return;
        const pm = LabelPM_1.LabelPM.getForID(id, appObjects);
        if (!pm) {
            appObjects.submitError("labelAdapter", "Unable to find LabelPM");
            return;
        }
        pm.addView(setVM);
    },
    unsubscribe: (id, appObjects, setVM) => {
        const pm = LabelPM_1.LabelPM.getForID(id, appObjects);
        if (pm) {
            pm.removeView(setVM);
        }
    },
};
//# sourceMappingURL=labelAdapter.js.map