Files
discord-decomp/modules/parent_tools/ParentalConsentStore.tsx
T
2026-11-01 12:12:55 +02:00

40 lines
1.1 KiB
TypeScript

// Metro module 14872 (f14873).
import Module589 from "../../_bundle/Module589";
import Dispatcher from "../../Dispatcher";
let c10511_1;
let shouldShowGuardianConnect = false;
class ParentalConsentStore extends Module589.PersistedStore {
static displayName = "ParentalConsentStore";
static persistKey = "ParentalConsentStore";
initialize(a0) {
let r4 = a0?.shouldShowGuardianConnect;
if (r4 == null) {
r4 = false;
}
shouldShowGuardianConnect = r4;
}
getShouldShowGuardianConnect() {
return shouldShowGuardianConnect;
}
getState() {
return {
shouldShowGuardianConnect
};
}
}
c10511_1 = new ParentalConsentStore(Dispatcher, {
GUARDIAN_CONNECT_REQUIRED: function handleGuardianConnectRequired(a0) {
shouldShowGuardianConnect = a0.shouldShowGuardianConnect === true;
c10511_1.persist();
},
GUARDIAN_CONNECT_CLEARED: function handleGuardianConnectCleared() {
shouldShowGuardianConnect = false;
c10511_1.persist();
},
NUF_COMPLETE: function handleNUFCompleted() {
shouldShowGuardianConnect = false;
c10511_1.persist();
}
});
export default c10511_1;