decord/source/modules/games/autocomplete/GameAutocompleteActionCreators.tsx

45 lines
1.7 KiB
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 7101
// Function ID: 57131
2026-07-20 16:05:17 +00:00
// Name: _fetchGameAutocomplete
2026-07-24 07:16:23 +00:00
// Dependencies: [5, 7090, 653, 7091, 686, 507, 2]
2026-07-20 16:05:17 +00:00
// Exports: fetchGameAutocomplete
2026-07-24 07:16:23 +00:00
// Module 7101 (_fetchGameAutocomplete)
2026-07-23 10:11:24 +00:00
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import closure_4 from "_isNativeReflectConstruct";
import { Endpoints } from "ME";
const require = arg1;
async function _fetchGameAutocomplete(arg0, arg1) {
let obj = outer2_0(outer2_2[3]);
const result = obj.normalizeGameAutocompleteQuery(arg0);
2026-07-20 16:05:17 +00:00
if (null != result) {
2026-07-23 10:11:24 +00:00
const shouldSuppressFetchResult = outer2_4.shouldSuppressFetch(tmp2);
const dispatch = outer2_1(outer2_2[4]).dispatch;
2026-07-20 16:05:17 +00:00
if (shouldSuppressFetchResult) {
obj = { type: "GAME_AUTOCOMPLETE_FETCH_SUCCESS", query: result, results: [] };
dispatch(obj);
} else {
obj = { type: "GAME_AUTOCOMPLETE_FETCH", query: tmp2 };
dispatch(obj);
2026-07-23 10:11:24 +00:00
const HTTP = outer2_0(outer2_2[5]).HTTP;
const obj1 = { url: outer2_5.GAMES_AUTOCOMPLETE };
2026-07-20 16:05:17 +00:00
const obj2 = { q: tmp2 };
obj1.query = obj2;
obj1.rejectWithError = false;
const body = yield HTTP.get(obj1).body;
const mapped = null != body ? body : [].map((id) => ({ id: String(id.id), name: id.name, icon: id.icon }));
const obj3 = { type: "GAME_AUTOCOMPLETE_FETCH_SUCCESS", query: tmp2, results: mapped };
2026-07-23 10:11:24 +00:00
outer2_1(outer2_2[4]).dispatch(obj3);
2026-07-20 16:05:17 +00:00
const arr = null != body ? body : [];
2026-07-23 10:11:24 +00:00
const obj5 = outer2_1(outer2_2[4]);
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const tmp21 = outer2_1(outer2_2[4]);
2026-07-20 16:05:17 +00:00
}
}
2026-07-23 10:11:24 +00:00
let result = require("ME").fileFinishedImporting("modules/games/autocomplete/GameAutocompleteActionCreators.tsx");
2026-07-20 16:05:17 +00:00
export const fetchGameAutocomplete = function fetchGameAutocomplete(arg0) {
return _fetchGameAutocomplete(...arguments);
};