decord/beta/source/modules/soundboard/useCustomJoinSound.tsx
github-actions e7a050048e chore: update source for beta 347.7
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4943.js (118.4 MB)
2026-09-21 19:31:18 +00:00

135 lines
3.5 KiB
TypeScript

// Module ID: 7618
// Function ID: 7619
// Name: useCustomJoinSound
// Dependencies: [1224, 5228, 558, 568, 504, 2]
// Exports: getCustomJoinSound
// Module 7618 (useCustomJoinSound)
import UserSettingsProtoStore from "UserSettingsProtoStore" /* 1224 */;
const require = globalThis.__r;
const require = fn;
let closure_3 = fn(5228).CUSTOM_CALL_SOUND_GLOBAL_GUILD_ID;
const CustomSoundType = { GLOBAL: 0, [0]: "GLOBAL", GUILD: 1, [1]: "GUILD" };
const ReactCompilerGating = fn(558);
const size = fn(2);
const result = size.fileFinishedImporting("modules/soundboard/useCustomJoinSound.tsx");
export { CustomSoundType };
export const useCustomJoinSound = ReactCompilerGating.isReactCompilerEnabled() ? ((arg0) => {
_require = arg0;
const cResult = require("c").c(3);
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
const items = [UserSettingsProtoStore];
cResult[0] = items;
let first = items;
} else {
first = cResult[0];
}
if (cResult[1] !== arg0) {
const fn = function u() {
const guilds = UserSettingsProtoStore.settings.guilds;
let guilds1;
if (guilds != null) {
guilds1 = guilds.guilds;
}
if (guilds1 == null) {
guilds1 = {};
}
let joinSound1;
if (guilds1[closure_0] != null) {
joinSound1 = tmp.joinSound;
}
if (guilds1[closure_3] != null) {
const joinSound = tmp3.joinSound;
}
let tmp4 = joinSound1;
if (joinSound1 == null) {
tmp4 = joinSound;
}
if (null != tmp4) {
const obj = {};
const merged = Object.assign(tmp4);
if (null != joinSound1) {
let GLOBAL = obj.GUILD;
} else {
GLOBAL = obj.GLOBAL;
}
obj.type = GLOBAL;
}
};
cResult[1] = arg0;
cResult[2] = fn;
let tmp6 = fn;
} else {
tmp6 = cResult[2];
}
let obj = require("c");
return require("initialize").useStateFromStores(first, tmp6);
}) : ((arg0) => {
_require = arg0;
const items = [UserSettingsProtoStore];
return require("initialize").useStateFromStores(items, () => {
const guilds = UserSettingsProtoStore.settings.guilds;
let guilds1;
if (guilds != null) {
guilds1 = guilds.guilds;
}
if (guilds1 == null) {
guilds1 = {};
}
let joinSound1;
if (guilds1[closure_0] != null) {
joinSound1 = tmp.joinSound;
}
if (guilds1[closure_3] != null) {
const joinSound = tmp3.joinSound;
}
let tmp4 = joinSound1;
if (joinSound1 == null) {
tmp4 = joinSound;
}
if (null != tmp4) {
const obj = {};
const merged = Object.assign(tmp4);
if (null != joinSound1) {
let GLOBAL = obj.GUILD;
} else {
GLOBAL = obj.GLOBAL;
}
obj.type = GLOBAL;
}
});
});
export const getCustomJoinSound = function getCustomJoinSound(arg0) {
const guilds = UserSettingsProtoStore.settings.guilds;
let guilds1;
if (guilds != null) {
guilds1 = guilds.guilds;
}
if (guilds1 == null) {
guilds1 = {};
}
let joinSound1;
if (guilds1[arg0] != null) {
joinSound1 = tmp.joinSound;
}
if (guilds1[closure_3] != null) {
const joinSound = tmp3.joinSound;
}
let tmp4 = joinSound1;
if (joinSound1 == null) {
tmp4 = joinSound;
}
if (null != tmp4) {
const obj = {};
const merged = Object.assign(tmp4);
if (null != joinSound1) {
let GLOBAL = obj.GUILD;
} else {
GLOBAL = obj.GLOBAL;
}
obj.type = GLOBAL;
}
};