/* Metro module 5198; source: modules/games/hooks/useGame.tsx; dependencies: [5, 31, 5199, 661, 566, 5202, 2] */ function _fun45885(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#45885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5376:6, offset: 0x0119a6ee, size: 261 bytes, params: 8, frame: 21 var object2; const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = importDefault(5) /* metro dependency 5 */; const env0_3 = importAll(31) /* metro dependency 31 */; const gameStore = importDefault(5199) /* metro dependency 5199: GameStore */; const QueryIds = (require(661) /* metro dependency 661: Constants */).QueryIds; const fluxModule = require(566) /* metro dependency 566: flux */; const createFetchStore = fluxModule.createFetchStore; object2 = {}; const GAME = QueryIds.GAME; object2.getQueryId = GAME; object2.get = get_45886; const env0_2 = value(_fun45888); object2.load = load_45889; object2.getIsLoading = getIsLoading; object2.getError = function(a0) { var value = null; return value != a0 && GameStore.didFetchingFail(a0) ? new global.Error('Failed to fetch game data') : value; }; value = Reflect.apply(createFetchStore, fluxModule, [gameStore, object2]); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/games/hooks/useGame.tsx'); exports.useGame = value; exports.useGames = useGames; } function get_45886(a0) { // fn#45886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5376:199, offset: 0x0119a7f3, size: 97 bytes, params: 2, frame: 14 var r1; var r0; var game; const value = null; if (value == a0) { r0 = value; } else { if (GameStore.hasNoData(a0)) { r1 = (require(566) /* metro dependency 566: flux */).NO_DATA; } else { game = GameStore.getGame(a0); r1 = value != game ? game : value; } r0 = r1; } return r0; } function* _fun45888(a0) { // fn#45888, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5376:302, offset: 0x0119a85d, size: 81 bytes, params: 2, frame: 13 let value = undefined; if (false) { return value; } if (a0 != null) { value = environment.__proto__; value = env1_0(env1_1[5]); yield value.fetchGamesWithSupplementalData([a0]); value = undefined; if (false) { return value; } } } function getIsLoading(a0) { // fn#45890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5376:436, offset: 0x0119a8ae, size: 32 bytes, params: 2, frame: 12 return a0 != null && GameStore.isFetching(a0); } function useGames(a0) { // fn#45892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5376:640, offset: 0x0119a919, size: 44 bytes, params: 2, frame: 14 const env0_0 = a0; env0_3.useEffect(_fun45893, [a0]); } function _fun45893() { // fn#45893, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5376:674, offset: 0x0119a945, size: 67 bytes, params: 1, frame: 15 let binding = env0_0; const value = binding.map(function(a0) { return [a0]; }); binding = env1_5; const fetchMany = binding.fetchMany; const items2 = []; arraySpread(items2, value, 0, undefined); apply(fetchMany, items2, binding, undefined); }