import { LabelPM, defaultLabelVM } from "../PM/LabelPM";
export const labelAdapter = {
    defaultVM: defaultLabelVM,
    subscribe: (id, appObjects, setVM) => {
        if (!id)
            return;
        const pm = LabelPM.getForID(id, appObjects);
        if (!pm) {
            appObjects.submitError("labelAdapter", "Unable to find LabelPM");
            return;
        }
        pm.addView(setVM);
    },
    unsubscribe: (id, appObjects, setVM) => {
        const pm = LabelPM.getForID(id, appObjects);
        if (pm) {
            pm.removeView(setVM);
        }
    },
};
//# sourceMappingURL=labelAdapter.js.map