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