decord/source/modules/guild_config_gates/GuildConfigGates.tsx

149 lines
4.2 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 16953
// Function ID: 16954
2026-07-20 16:05:17 +00:00
// Name: importDefaultResult1
2026-08-24 06:08:38 +00:00
// Dependencies: [5, 16954, 676, 589, 530, 709, 2]
2026-07-20 16:05:17 +00:00
// Exports: useApplicationIdentityLinkedRolesEnabled, useGuildVerificationRoleEnabled
2026-08-24 06:08:38 +00:00
// Module 16953 (importDefaultResult1)
import importDefaultResult1 from "hasLoaded" /* 16954 */;
import { Endpoints } from "ME" /* 676 */;
import initialize from "initialize" /* 589 */;
import importDefaultResult from "asyncGeneratorStep" /* 5 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
initialize = {
2026-07-20 16:05:17 +00:00
getQueryId(arg0) {
2026-07-29 08:29:29 +00:00
let tmp = arg0;
if (arg0 == null) {
tmp = null;
}
return tmp;
},
get(arg0) {
2026-07-20 16:05:17 +00:00
let tmp = null;
if (null != arg0) {
2026-07-29 08:29:29 +00:00
let gates = null;
if (importDefaultResult1.hasLoaded(arg0)) {
gates = obj.getGates(arg0);
}
tmp = gates;
obj = importDefaultResult1;
2026-07-20 16:05:17 +00:00
}
return tmp;
},
2026-07-29 08:29:29 +00:00
load: null
2026-07-20 16:05:17 +00:00
};
2026-08-24 06:08:38 +00:00
let closure_3 = importDefaultResult((arg0) => {
closure_0 = arg0;
c5 = 0;
c6 = 0;
2026-07-29 08:29:29 +00:00
return (function*(arg0, body) {
if (c6 === 2) {
c6 = 3;
HermesBuiltin.throwTypeError();
} else if (tmp4 === 3) {
if (arg0 === 1) {
throw body;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = body;
return obj;
} else {
2026-08-24 06:08:38 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} else {
try {
c6 = 2;
if (0 === c5) {
if (arg0 === 1) {
c6 = 3;
throw body;
} else if (arg0 === 2) {
c6 = 3;
obj = { value: null, done: true };
obj[0] = body;
return obj;
} else {
2026-08-24 06:08:38 +00:00
closure_4 = tmp5;
closure_3 = tmp2;
2026-07-29 08:29:29 +00:00
let lib;
if (null != callback) {
2026-08-24 06:08:38 +00:00
const HTTP = callback(closure_1_2[4]).HTTP;
2026-07-29 08:29:29 +00:00
c5 = 1;
c6 = 1;
2026-08-24 06:08:38 +00:00
obj1 = { value: null, done: false };
2026-07-29 08:29:29 +00:00
obj1[0] = HTTP.get(c5.GUILD_CONFIG_GATES(tmp27));
return obj1;
} else {
c6 = 3;
}
}
} else if (arg0 === 1) {
c6 = 3;
throw body;
} else if (arg0 !== 2) {
lib = body.body;
const obj2 = { type: "GUILD_CONFIG_GATES_FETCH_SUCCESS", guildId: null, guildVerificationRoleEnabled: null, applicationIdentityLinkedRolesEnabled: null };
obj2[1] = callback;
const guild_verification_role_enabled = lib.guild_verification_role_enabled;
lib = guild_verification_role_enabled;
if (guild_verification_role_enabled == null) {
lib = false;
}
obj2[2] = lib;
const application_identity_linked_roles_enabled = lib.application_identity_linked_roles_enabled;
let table = application_identity_linked_roles_enabled;
if (application_identity_linked_roles_enabled == null) {
table = false;
}
obj2[3] = table;
lib(table[5]).dispatch(obj2);
const obj5 = lib(table[5]);
}
c6 = 3;
obj = { value: null, done: true };
obj[0] = body;
return obj;
} catch (tmp14) {
c6 = tmp;
throw tmp14;
}
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
})();
});
initialize[2] = function() {
const self = this;
const apply = closure_3.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
};
2026-07-23 10:11:24 +00:00
let closure_6 = initialize.createFetchStore(importDefaultResult1, initialize);
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/guild_config_gates/GuildConfigGates.tsx");
2026-07-20 16:05:17 +00:00
export const useGuildVerificationRoleEnabled = function useGuildVerificationRoleEnabled(arg0) {
2026-07-29 08:29:29 +00:00
const data = callback(arg0).data;
let flag;
if (data != null) {
flag = data.guildVerificationRoleEnabled;
}
if (flag == null) {
flag = false;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return flag;
2026-07-20 16:05:17 +00:00
};
export const useApplicationIdentityLinkedRolesEnabled = function useApplicationIdentityLinkedRolesEnabled(arg0) {
2026-07-29 08:29:29 +00:00
const data = callback(arg0).data;
let flag;
if (data != null) {
flag = data.applicationIdentityLinkedRolesEnabled;
}
if (flag == null) {
flag = false;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return flag;
2026-07-20 16:05:17 +00:00
};