Files
discord-decomp/modules/game_console/native/beginConsoleTransfer.tsx
T
2026-11-01 12:12:55 +02:00

42 lines
1.5 KiB
TypeScript

// Metro module 9038 (f9039).
import { PlatformTypes } from "../../../Constants";
import { fetchDevices } from "../GameConsoleActionCreators";
import { transferToPlaystationWithAlert } from "./GameConsoleActionCreators";
import ActionSheetActionCreators from "../../action_sheet/native/ActionSheetActionCreators";
import "../../../_bundle/asyncRequire";
import { ImpressionNames } from "../../../_bundle/Module503";
import transferToXbox from "./transferToXbox";
let c5913_4 = new Set([PlatformTypes.PLAYSTATION, PlatformTypes.PLAYSTATION_STAGING]);
export async function beginConsoleTransfer(c26342_0, c26342_1) {
let r92;
let c26342_3;
let c30011_0, c30011_1, c30011_2, c30011_3;
L17: {
L16: {
c26342_3 = void 0;
c30011_0 = c26342_0;
c30011_1 = c26342_1;
c30011_2 = void 0;
c30011_3 = void 0;
if (c5913_4.has(c26342_1)) {
c30011_2 = await fetchDevices(c26342_1);
if (c30011_2.length !== 1) {
r92 = ActionSheetActionCreators.openLazy(import("./GameConsoleDeviceListActionSheet"), `GameConsoleDeviceListActionSheet${c30011_0.id}`, {
channel: c30011_0,
platform: c30011_1,
impressionName: ImpressionNames.GAME_CONSOLE_DEVICE_LIST
});
break L17;
}
c30011_3 = c30011_2[0];
await transferToPlaystationWithAlert(c30011_1, c30011_3, c30011_0);
break L16;
}
transferToXbox(c26342_0);
return void 0;
}
return void 0;
}
return r92;
}