decord/beta/source/modules/game_claim/useGameClaimCoachmark.tsx

79 lines
2.7 KiB
TypeScript
Raw Permalink Normal View History

2026-10-12 16:32:48 +00:00
// Module ID: 16707
// Function ID: 16708
// Name: useGameClaimCoachmark
2026-10-12 16:32:48 +00:00
// Dependencies: [4750, 1085, 558, 576, 16708, 504, 16628, 2]
2026-10-12 16:32:48 +00:00
// Module 16707 (useGameClaimCoachmark)
2026-10-07 22:43:51 +00:00
import Constants from "Constants" /* 1085 */;
2026-10-12 16:32:48 +00:00
import PermissionStore from "PermissionStore" /* 4750 */;
2026-10-02 13:37:24 +00:00
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
2026-10-01 14:13:23 +00:00
import size from "module_2" /* 2 */;
const require = globalThis.__r;
2026-10-01 14:13:23 +00:00
let _require;
2026-10-01 14:13:23 +00:00
const Permissions = Constants.Permissions;
2026-10-12 16:32:48 +00:00
const tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function useCanShowGameClaimCoachmark(guildId) {
2026-10-02 13:37:24 +00:00
let first;
let tmp7;
let tmp8;
_require = guildId;
let obj = require("react");
const cResult = obj.c(4);
const obj2 = require("GameClaimCoachmarkExperiment");
let gameClaimCoachmarkEnabled = obj2.useGameClaimCoachmarkEnabled(guildId, "useCanShowGameClaimCoachmark");
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
const items = [PermissionStore];
cResult[0] = items;
first = items;
} else {
first = cResult[0];
}
if (cResult[1] !== guildId) {
const fn = function l() {
const obj = { guildId };
return PermissionStore.canWithPartialContext(Permissions.ADMINISTRATOR, obj);
};
const items1 = [guildId];
cResult[1] = guildId;
cResult[2] = fn;
cResult[3] = items1;
tmp8 = items1;
tmp7 = fn;
} else {
tmp7 = cResult[2];
tmp8 = cResult[3];
}
const tmpResult = require("get initialized");
if (gameClaimCoachmarkEnabled) {
gameClaimCoachmarkEnabled = tmpResult.useStateFromStores(first, tmp7, tmp8);
}
const tmpResult2 = require("UnclaimedGamesActionCreators");
if (gameClaimCoachmarkEnabled) {
gameClaimCoachmarkEnabled = tmpResult2.useHasUnclaimedGames(guildId, gameClaimCoachmarkEnabled);
}
return gameClaimCoachmarkEnabled;
2026-10-12 16:32:48 +00:00
}) : (function useCanShowGameClaimCoachmark(guildId) {
2026-10-02 13:37:24 +00:00
_require = guildId;
2026-10-01 14:13:23 +00:00
let obj = require("GameClaimCoachmarkExperiment");
2026-10-02 13:37:24 +00:00
let gameClaimCoachmarkEnabled = obj.useGameClaimCoachmarkEnabled(guildId, "useCanShowGameClaimCoachmark");
const items = [PermissionStore];
2026-10-02 13:37:24 +00:00
const items1 = [guildId];
2026-10-01 14:13:23 +00:00
const obj2 = require("get initialized");
const tmp = _require;
if (gameClaimCoachmarkEnabled) {
2026-10-01 14:13:23 +00:00
gameClaimCoachmarkEnabled = obj2.useStateFromStores(items, () => {
const obj = { guildId };
return PermissionStore.canWithPartialContext(Permissions.ADMINISTRATOR, obj);
}, items1);
}
2026-10-12 16:32:48 +00:00
const tmpResult = tmp(16628);
if (gameClaimCoachmarkEnabled) {
2026-10-02 13:37:24 +00:00
gameClaimCoachmarkEnabled = tmpResult.useHasUnclaimedGames(guildId, gameClaimCoachmarkEnabled);
}
return gameClaimCoachmarkEnabled;
2026-10-02 13:37:24 +00:00
});
const result = size.fileFinishedImporting("modules/game_claim/useGameClaimCoachmark.tsx");
export const useCanShowGameClaimCoachmark = tmp2;