Files
discord-decomp/stores/ConsentStore.tsx
T
2026-11-01 12:12:55 +02:00

56 lines
1.3 KiB
TypeScript

// Metro module 5643 (f5644).
import Module589 from "../_bundle/Module589";
import Dispatcher from "../Dispatcher";
let c3483_0 = false;
let c3483_1 = false;
let c3483_2 = {};
let consentRequired = null;
class ConsentStore extends Module589.Store {
static displayName = "ConsentStore";
hasConsented(a0) {
return c3483_2[a0] != null && c3483_2[a0].consented;
}
get consents() {
return c3483_2;
}
get fetchedConsents() {
return c3483_0;
}
get receivedConsentsInConnectionOpen() {
return c3483_1;
}
getAuthenticationConsentRequired() {
return consentRequired;
}
}
const consentStore = new ConsentStore(Dispatcher, {
CONNECTION_OPEN: function handleConnectionOpen({ consents: consents2 }) {
if (consents2 != null) {
c3483_2 = {
...c3483_2,
...consents2
};
c3483_1 = true;
}
},
OVERLAY_INITIALIZE: function handleOverlayInitialize(a0) {
c3483_2 = {
...a0.consents
};
c3483_0 = true;
},
UPDATE_CONSENTS: function handleUpdateConsents(a0) {
c3483_2 = {
...a0.consents
};
c3483_0 = true;
},
SET_CONSENT_REQUIRED: function handleConsentRequired(a0) {
consentRequired = a0.consentRequired;
},
LOGOUT: function handleLogout() {
consentRequired = null;
}
});
export default consentStore;