46 lines
1.1 KiB
TypeScript
46 lines
1.1 KiB
TypeScript
// Metro module 8187 (f8188).
|
|
import Module589 from "../../_bundle/Module589";
|
|
import LabFeatures from "./LabFeatures";
|
|
import Dispatcher from "../../Dispatcher";
|
|
const toggleStates = {};
|
|
class LabFeatureStore extends Module589.DeviceSettingsStore {
|
|
static displayName = "LabFeatureStore";
|
|
static persistKey = "LabFeatureStore";
|
|
getUserAgnosticState() {
|
|
return {
|
|
toggleStates
|
|
};
|
|
}
|
|
initialize(a0) {
|
|
for (const key in LabFeatures) {
|
|
const r4 = a0 == null;
|
|
let r17 = void 0;
|
|
if (!r4) {
|
|
const toggleStates2 = a0.toggleStates;
|
|
r17 = toggleStates2 == null ? void 0 : toggleStates2[key];
|
|
}
|
|
if (r17 == null) {
|
|
r17 = false;
|
|
}
|
|
toggleStates[key] = r17;
|
|
}
|
|
}
|
|
get(a0) {
|
|
let r4 = toggleStates[a0];
|
|
if (r4 == null) {
|
|
r4 = false;
|
|
}
|
|
return r4;
|
|
}
|
|
set(a0, a1) {
|
|
toggleStates[a0] = a1;
|
|
return a1;
|
|
}
|
|
}
|
|
const labFeatureStore = new LabFeatureStore(Dispatcher, {
|
|
LAB_FEATURE_TOGGLE: function handleLabFeatureToggleSet(a0) {
|
|
toggleStates[a0.labFeature] = a0.enabled;
|
|
}
|
|
});
|
|
export default labFeatureStore;
|