decord/source/modules/quests/native/QuestBottomSheet/QuestBottomSheetConsoleConnect.tsx

159 lines
7.2 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 14582
// Function ID: 14583
2026-07-20 16:05:17 +00:00
// Name: NonInlineConsoleConnection
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 17, 676, 21, 712, 4668, 10723, 10992, 10726, 10728, 4346, 7398, 14540, 2008, 9539, 9540, 9544, 7507, 7518, 6756, 9818, 6317, 6322, 12066, 1236, 9160, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 14582 (NonInlineConsoleConnection)
import ThemesDefault from "Themes" /* 712 */;
import TableRowGroupTitle from "TableRowGroupTitle" /* 6317 */;
import closure_3 from "noop" /* 19 */;
import { View } from "get ActivityIndicator" /* 17 */;
import ME from "ME" /* 676 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-20 16:05:17 +00:00
function NonInlineConsoleConnection(arg0) {
2026-07-23 10:11:24 +00:00
({ consoles, onConsoleSelect: require } = arg0);
2026-08-24 06:08:38 +00:00
return callback(TableRowGroupTitle.TableRowGroup, {
hasIcons: true,
children: consoles.map((type) => {
const obj = {};
const merged = Object.assign(type);
obj.onPress = closure_0;
return closure_1_6(closure_1_8, obj, type.type);
})
2026-07-29 08:29:29 +00:00
});
2026-07-20 16:05:17 +00:00
}
function ConsoleRow(onPress) {
2026-07-23 10:11:24 +00:00
onPress = onPress.onPress;
2026-07-29 08:29:29 +00:00
const merged = Object.assign(onPress, Object.create(null));
2026-07-20 16:05:17 +00:00
const type = merged.type;
if (constants.PLAYSTATION === type) {
2026-07-29 08:29:29 +00:00
let obj = { arrow: true, icon: null, label: null, subLabel: null, onPress: null };
2026-08-24 06:08:38 +00:00
obj[1] = callback(onPress(12066).PlaystationNeutralIcon, {});
2026-07-29 08:29:29 +00:00
const intl3 = onPress(1236).intl;
obj[2] = intl3.string(onPress(1236).t.JafL6p);
2026-07-20 16:05:17 +00:00
let stringResult;
if (null != merged.account) {
2026-07-29 08:29:29 +00:00
const intl4 = tmp8(1236).intl;
stringResult = intl4.string(tmp8(1236).t["u30/ut"]);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[3] = stringResult;
obj[4] = function onPress() {
2026-07-20 16:05:17 +00:00
return onPress(merged);
};
2026-08-24 06:08:38 +00:00
return callback(onPress(6322).TableRow, obj);
2026-07-29 08:29:29 +00:00
} else if (tmp2.XBOX === type) {
obj = { arrow: true, icon: null, label: null, subLabel: null, onPress: null };
2026-08-24 06:08:38 +00:00
obj[1] = callback(onPress(9160).XboxNeutralIcon, {});
2026-07-29 08:29:29 +00:00
const intl = onPress(1236).intl;
obj[2] = intl.string(onPress(1236).t.Nfvo72);
2026-07-20 16:05:17 +00:00
let stringResult1;
if (null != merged.account) {
2026-07-29 08:29:29 +00:00
const intl2 = tmp4(1236).intl;
stringResult1 = intl2.string(tmp4(1236).t["u30/ut"]);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[3] = stringResult1;
obj[4] = function onPress() {
2026-07-20 16:05:17 +00:00
return onPress(merged);
};
2026-08-24 06:08:38 +00:00
return callback(onPress(6322).TableRow, obj);
2026-07-20 16:05:17 +00:00
} else {
return null;
}
}
2026-07-29 08:29:29 +00:00
({ PlatformTypes: c4, UserSettingsSections: c5 } = ME);
2026-07-23 10:11:24 +00:00
({ jsx: closure_6, jsxs, Fragment } = jsxProd);
2026-08-24 06:08:38 +00:00
const PLATFORM_XBOX = ThemesDefault.unsafe_rawColors.PLATFORM_XBOX;
const PLATFORM_PLAYSTATION = ThemesDefault.unsafe_rawColors.PLATFORM_PLAYSTATION;
2026-07-29 08:29:29 +00:00
createCacheKey = { platformButtonsContainer: null, platformButton: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { display: "flex", flexDirection: "row", gap: ThemesDefault.space.PX_16, justifyContent: "space-between" };
2026-07-29 08:29:29 +00:00
createCacheKey[0] = createCacheKey;
createCacheKey[1] = { flex: 1, display: "flex", justifyContent: "center", alignItems: "center" };
createCacheKey = createCacheKey.createStyles(createCacheKey);
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/quests/native/QuestBottomSheet/QuestBottomSheetConsoleConnect.tsx");
2026-07-20 16:05:17 +00:00
export default function QuestBottomSheetConsoleConnect(quest) {
quest = quest.quest;
2026-07-23 10:11:24 +00:00
({ step: importDefault, sourceQuestContent: dependencyMap } = quest);
2026-07-29 08:29:29 +00:00
let xboxAndPlaystationAccounts;
2026-08-24 06:08:38 +00:00
closure_4 = undefined;
closure_5 = undefined;
2026-07-20 16:05:17 +00:00
function openQuestBottomSheet(NonInlineConsoleConnection, arg1) {
2026-08-24 06:08:38 +00:00
let obj = closure_1_1(closure_1_2[10]);
2026-07-23 10:11:24 +00:00
obj = { questId: quest.id, initialStep: closure_1, sourceQuestContent: closure_2 };
2026-08-24 06:08:38 +00:00
obj.openLazy(quest(closure_1_2[13])(closure_1_2[12], closure_1_2.paths), "QuestBottomSheet", obj);
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
let obj = quest(10723);
2026-07-29 08:29:29 +00:00
xboxAndPlaystationAccounts = obj.useConnectedAccounts().xboxAndPlaystationAccounts;
2026-08-24 06:08:38 +00:00
closure_4 = quest(10992).useTrackQuestContentClickedWithImpression();
let obj2 = quest(10992);
closure_5 = quest(10726).useQuestImpressionId();
2026-07-20 16:05:17 +00:00
const items = [quest, xboxAndPlaystationAccounts];
obj = {
2026-07-23 10:11:24 +00:00
consoles: xboxAndPlaystationAccounts.useMemo(() => {
2026-08-24 06:08:38 +00:00
const obj = quest(closure_1_2[9]);
return quest(closure_1_2[9]).supportedConsoles(quest).map((type) => {
closure_0 = type;
return { type, account: closure_3.find((type) => type.type === closure_0) };
2026-07-23 10:11:24 +00:00
});
2026-07-20 16:05:17 +00:00
}, items),
onConsoleSelect(account) {
if (null != account.account) {
2026-08-24 06:08:38 +00:00
if (obj5.shouldMigrateToAdAnalyticsInterface(quest(closure_1_2[14]).AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL, "quest_bottom_sheet_console_connect")) {
2026-07-29 08:29:29 +00:00
let obj = { type: null, adCreativeType: null, adCreativeId: null, questContentCTA: null, surfaceId: null, sourceQuestContent: null, impressionId: null };
2026-08-24 06:08:38 +00:00
obj[0] = quest(closure_1_2[16]).AdUserActionType.CLICK_INTERNAL;
obj[1] = quest(closure_1_2[17]).AdCreativeType.QUEST;
2026-07-29 08:29:29 +00:00
obj[2] = quest.id;
2026-08-24 06:08:38 +00:00
obj[3] = quest(closure_1_2[18]).QuestContentCTA.VIEW_CONSOLE_CONNECTIONS;
obj[4] = quest(closure_1_2[19]).QuestContent.QUEST_BOTTOM_SHEET;
2026-07-29 08:29:29 +00:00
obj[5] = closure_2;
obj[6] = constants;
2026-08-24 06:08:38 +00:00
quest(closure_1_2[15]).captureAdUserAction(obj);
const obj7 = quest(closure_1_2[15]);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
obj = { questId: null, questContent: null, questContentCTA: null, sourceQuestContent: null };
obj[0] = quest.id;
2026-08-24 06:08:38 +00:00
obj[1] = quest(closure_1_2[19]).QuestContent.QUEST_BOTTOM_SHEET;
obj[2] = quest(closure_1_2[18]).QuestContentCTA.VIEW_CONSOLE_CONNECTIONS;
2026-07-29 08:29:29 +00:00
obj[3] = closure_2;
2026-07-23 10:11:24 +00:00
callback(obj);
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
obj5 = quest(closure_1_2[14]);
closure_1_1(closure_1_2[10]).hideActionSheet();
const obj9 = closure_1_1(closure_1_2[10]);
obj1 = { screen: null };
2026-07-29 08:29:29 +00:00
obj1[0] = constants.CONNECTIONS;
2026-08-24 06:08:38 +00:00
quest(closure_1_2[11]).openUserSettings(obj1);
2026-07-20 16:05:17 +00:00
} else {
2026-08-24 06:08:38 +00:00
if (obj12.shouldMigrateToAdAnalyticsInterface(quest(closure_1_2[14]).AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL, "quest_bottom_sheet_console_connect")) {
obj1 = quest(closure_1_2[15]);
2026-07-29 08:29:29 +00:00
const obj2 = { type: null, adCreativeType: null, adCreativeId: null, questContentCTA: null, surfaceId: null, sourceQuestContent: null, impressionId: null };
2026-08-24 06:08:38 +00:00
obj2[0] = quest(closure_1_2[16]).AdUserActionType.CLICK_INTERNAL;
obj2[1] = quest(closure_1_2[17]).AdCreativeType.QUEST;
2026-07-29 08:29:29 +00:00
obj2[2] = quest.id;
2026-08-24 06:08:38 +00:00
obj2[3] = quest(closure_1_2[18]).QuestContentCTA.CONNECT_CONSOLE;
obj2[4] = quest(closure_1_2[19]).QuestContent.QUEST_BOTTOM_SHEET;
2026-07-29 08:29:29 +00:00
obj2[5] = closure_2;
obj2[6] = constants;
2026-07-20 16:05:17 +00:00
obj1.captureAdUserAction(obj2);
} else {
2026-07-29 08:29:29 +00:00
obj = { questId: null, questContent: null, questContentCTA: null, sourceQuestContent: null };
obj[0] = quest.id;
2026-08-24 06:08:38 +00:00
obj[1] = quest(closure_1_2[19]).QuestContent.QUEST_BOTTOM_SHEET;
obj[2] = quest(closure_1_2[18]).QuestContentCTA.CONNECT_CONSOLE;
2026-07-29 08:29:29 +00:00
obj[3] = closure_2;
2026-07-23 10:11:24 +00:00
callback(obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const obj3 = { platformType: null, location: "quests", onClose: null };
obj3[0] = account.type;
obj3[2] = openQuestBottomSheet;
2026-08-24 06:08:38 +00:00
closure_1_1(closure_1_2[20])(obj3);
2026-07-20 16:05:17 +00:00
}
}
};
return openQuestBottomSheet(NonInlineConsoleConnection, obj);
};