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

79 lines
2.7 KiB
TypeScript
Raw Permalink Normal View History

2026-10-13 12:43:34 +00:00
// Module ID: 17011
// Function ID: 17012
// Name: useGameClaimCoachmark
2026-10-13 12:43:34 +00:00
// Dependencies: [4750, 1085, 558, 576, 17012, 504, 16933, 2]
2026-07-20 16:05:17 +00:00
2026-10-13 12:43:34 +00:00
// Module 17011 (useGameClaimCoachmark)
2026-10-03 08:58:59 +00:00
import Constants from "Constants" /* 1085 */;
2026-10-10 08:08:14 +00:00
import PermissionStore from "PermissionStore" /* 4750 */;
2026-10-03 08:58:59 +00:00
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
const require = globalThis.__r;
2026-10-03 08:58:59 +00:00
let _require;
2026-10-03 08:58:59 +00:00
const Permissions = Constants.Permissions;
2026-10-08 09:57:35 +00:00
const tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function useCanShowGameClaimCoachmark(guildId) {
2026-10-03 08:58:59 +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-08 09:57:35 +00:00
}) : (function useCanShowGameClaimCoachmark(guildId) {
2026-10-03 08:58:59 +00:00
_require = guildId;
let obj = require("GameClaimCoachmarkExperiment");
let gameClaimCoachmarkEnabled = obj.useGameClaimCoachmarkEnabled(guildId, "useCanShowGameClaimCoachmark");
const items = [PermissionStore];
2026-10-03 08:58:59 +00:00
const items1 = [guildId];
const obj2 = require("get initialized");
const tmp = _require;
2026-07-20 16:05:17 +00:00
if (gameClaimCoachmarkEnabled) {
2026-10-03 08:58:59 +00:00
gameClaimCoachmarkEnabled = obj2.useStateFromStores(items, () => {
const obj = { guildId };
return PermissionStore.canWithPartialContext(Permissions.ADMINISTRATOR, obj);
}, items1);
2026-07-20 16:05:17 +00:00
}
2026-10-13 12:43:34 +00:00
const tmpResult = tmp(16933);
2026-07-20 16:05:17 +00:00
if (gameClaimCoachmarkEnabled) {
2026-10-03 08:58:59 +00:00
gameClaimCoachmarkEnabled = tmpResult.useHasUnclaimedGames(guildId, gameClaimCoachmarkEnabled);
2026-07-20 16:05:17 +00:00
}
return gameClaimCoachmarkEnabled;
2026-10-03 08:58:59 +00:00
});
const result = size.fileFinishedImporting("modules/game_claim/useGameClaimCoachmark.tsx");
export const useCanShowGameClaimCoachmark = tmp2;