This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,59 @@
// Metro module 16479 (f16480).
import GuildConfigGatesStore from "./GuildConfigGatesStore";
import { Endpoints } from "../../Constants";
import { createFetchStore } from "../../_bundle/Module589";
import { HTTP } from "../../_bundle/sendRequest";
import Dispatcher from "../../Dispatcher";
let fetchStore;
let c11859_3 = async (c23251_0) => {
let guild_verification_role_enabled, application_identity_linked_roles_enabled, c23251_4;
let c28418_0, c28418_1;
L17: {
c23251_4 = void 0;
c28418_0 = c23251_0;
c28418_1 = void 0;
if (c23251_0 != null) {
c28418_1 = (await HTTP.get(Endpoints.GUILD_CONFIG_GATES(c23251_0))).body;
const guild_verification_role_enabled2 = c28418_1.guild_verification_role_enabled;
guild_verification_role_enabled = guild_verification_role_enabled2;
if (guild_verification_role_enabled2 == null) {
guild_verification_role_enabled = false;
}
const application_identity_linked_roles_enabled2 = c28418_1.application_identity_linked_roles_enabled;
application_identity_linked_roles_enabled = application_identity_linked_roles_enabled2;
if (application_identity_linked_roles_enabled2 == null) {
application_identity_linked_roles_enabled = false;
}
Dispatcher.dispatch({
type: "GUILD_CONFIG_GATES_FETCH_SUCCESS",
guildId: c28418_0,
guildVerificationRoleEnabled: guild_verification_role_enabled,
applicationIdentityLinkedRolesEnabled: application_identity_linked_roles_enabled
});
break L17;
}
return void 0;
}
};
fetchStore = createFetchStore(GuildConfigGatesStore, {
getQueryId: (a0) => a0 == null ? null : a0,
get: (a0) => a0 == null ? null : GuildConfigGatesStore.hasLoaded(a0) ? GuildConfigGatesStore.getGates(a0) : null,
load: function() {
const apply = c11859_3.apply;
return c11859_3.apply(this, arguments);
}
});
export function useGuildVerificationRoleEnabled(a0) {
let r8 = fetchStore(a0).data?.guildVerificationRoleEnabled;
if (r8 == null) {
r8 = false;
}
return r8;
}
export function useApplicationIdentityLinkedRolesEnabled(a0) {
let r8 = fetchStore(a0).data?.applicationIdentityLinkedRolesEnabled;
if (r8 == null) {
r8 = false;
}
return r8;
}
@@ -0,0 +1,32 @@
// Metro module 16480 (f16481).
import Module589 from "../../_bundle/Module589";
import Dispatcher from "../../Dispatcher";
let c11860_0 = {};
class GuildConfigGatesStore extends Module589.Store {
static displayName = "GuildConfigGatesStore";
hasLoaded(a0) {
return c11860_0[a0] != null;
}
getGates(a0) {
let r4 = c11860_0[a0];
if (r4 == null) {
r4 = {
guildVerificationRoleEnabled: false,
applicationIdentityLinkedRolesEnabled: false
};
}
return r4;
}
}
const guildConfigGatesStore = new GuildConfigGatesStore(Dispatcher, {
GUILD_CONFIG_GATES_FETCH_SUCCESS: function handleFetchSuccess(a0) {
c11860_0[a0.guildId] = {
guildVerificationRoleEnabled: a0.guildVerificationRoleEnabled,
applicationIdentityLinkedRolesEnabled: a0.applicationIdentityLinkedRolesEnabled
};
},
LOGOUT: function handleLogout() {
c11860_0 = {};
}
});
export default guildConfigGatesStore;