// Metro module 14186 (f14187). import { useMemo } from "react"; import { View } from "react-native"; import { PlatformTypes, UserSettingsSections } from "../../../../Constants"; import { jsxs, Fragment } from "react/jsx-runtime"; import Module712 from "../../../../_bundle/Module712"; import { createStyles } from "../../../../design/components/Styles/native/createStyles"; import { useConnectedAccounts } from "../../hooks/QuestHooks"; import { useTrackQuestContentClickedWithImpression } from "../../lib/analytics/AnalyticsHooks"; import { useQuestImpressionId } from "../../lib/analytics/ContentImpressionTrackerHooks"; import { supportedConsoles } from "../../utils/QuestPlatformUtils"; import ActionSheetActionCreators from "../../../action_sheet/native/ActionSheetActionCreators"; import { openUserSettings } from "../../../user_settings/core/native/openUserSettings"; import { shouldMigrateToAdAnalyticsInterface, AdAnalyticsInterfaceExperimentStep } from "../../experiments/AdAnalyticsInterfaceExperiment"; import { captureAdUserAction } from "../../../ads/analytics/captureAdUserAction"; import { AdUserActionType } from "../../../ads/analytics/captureAdUserActionTypes"; import { AdCreativeType } from "../../../../_bundle/Module6013"; import { QuestContentCTA } from "../../lib/analytics/AnalyticsTypes"; import { QuestContent } from "../../QuestTypes"; import authorizeConnection_native from "../../../connections/authorizeConnection.native"; import { TableRowGroup } from "../../../../design/components/TableRow/native/TableRowGroup.native"; import { TableRow } from "../../../../design/components/TableRow/native/TableRow.native"; import { PlaystationNeutralIcon } from "../../../../design/components/Icon/native/redesign/generated/PlaystationNeutralIcon"; import { intl, t } from "../../../../intl/index.native"; import { XboxNeutralIcon } from "../../../../design/components/Icon/native/redesign/generated/XboxNeutralIcon"; let ConsoleRow; const NonInlineConsoleConnection = function NonInlineConsoleConnection(props) { const { consoles, onConsoleSelect: onConsoleSelect2 } = props; return {consoles.map((console) => )} ; }; ConsoleRow = function ConsoleRow(props) { const { onPress: onPress2, ...rest } = props; let c21017_1 = rest; const type = rest.type; if (PlatformTypes.PLAYSTATION === type) { return } label={intl.string(t.JafL6p)} subLabel={rest.account != null ? intl.string(t["u30/ut"]) : void 0} onPress={() => onPress2(c21017_1)} />; } if (PlatformTypes.XBOX === type) { return } label={intl.string(t.Nfvo72)} subLabel={rest.account != null ? intl.string(t["u30/ut"]) : void 0} onPress={() => onPress2(c21017_1)} />; } return null; }; View; jsxs; Fragment; Module712.unsafe_rawColors.PLATFORM_XBOX; Module712.unsafe_rawColors.PLATFORM_PLAYSTATION; createStyles({ platformButtonsContainer: { display: "flex", flexDirection: "row", gap: Module712.space.PX_16, justifyContent: "space-between" }, platformButton: { flex: 1, display: "flex", justifyContent: "center", alignItems: "center" } }); export default function QuestBottomSheetConsoleConnect(props) { let xboxAndPlaystationAccounts, trackQuestContentClickedWithImpression, questImpressionId; const { quest, step, sourceQuestContent } = props; xboxAndPlaystationAccounts = void 0; trackQuestContentClickedWithImpression = void 0; questImpressionId = void 0; const openQuestBottomSheet2 = function openQuestBottomSheet() { ActionSheetActionCreators.openLazy(import("./QuestBottomSheet"), "QuestBottomSheet", { questId: quest.id, initialStep: step, sourceQuestContent }); }; xboxAndPlaystationAccounts = useConnectedAccounts().xboxAndPlaystationAccounts; trackQuestContentClickedWithImpression = useTrackQuestContentClickedWithImpression(); questImpressionId = useQuestImpressionId(); return supportedConsoles(quest).map((item) => { return { type: item, account: xboxAndPlaystationAccounts.find((xboxAndPlaystationAccount) => xboxAndPlaystationAccount.type === item) }; }), [quest, xboxAndPlaystationAccounts])} onConsoleSelect={function onConsoleSelect(event) { if (event.account != null) { if (shouldMigrateToAdAnalyticsInterface(AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL, "quest_bottom_sheet_console_connect")) { captureAdUserAction({ type: AdUserActionType.CLICK_INTERNAL, adCreativeType: AdCreativeType.QUEST, adCreativeId: quest.id, questContentCTA: QuestContentCTA.VIEW_CONSOLE_CONNECTIONS, surfaceId: QuestContent.QUEST_BOTTOM_SHEET, sourceQuestContent, impressionId: questImpressionId }); } else { trackQuestContentClickedWithImpression({ questId: quest.id, questContent: QuestContent.QUEST_BOTTOM_SHEET, questContentCTA: QuestContentCTA.VIEW_CONSOLE_CONNECTIONS, sourceQuestContent }); } ActionSheetActionCreators.hideActionSheet(); openUserSettings({ screen: UserSettingsSections.CONNECTIONS }); return void 0; } if (shouldMigrateToAdAnalyticsInterface(AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL, "quest_bottom_sheet_console_connect")) { captureAdUserAction({ type: AdUserActionType.CLICK_INTERNAL, adCreativeType: AdCreativeType.QUEST, adCreativeId: quest.id, questContentCTA: QuestContentCTA.CONNECT_CONSOLE, surfaceId: QuestContent.QUEST_BOTTOM_SHEET, sourceQuestContent, impressionId: questImpressionId }); } else { trackQuestContentClickedWithImpression({ questId: quest.id, questContent: QuestContent.QUEST_BOTTOM_SHEET, questContentCTA: QuestContentCTA.CONNECT_CONSOLE, sourceQuestContent }); } authorizeConnection_native({ platformType: event.type, location: "quests", onClose: openQuestBottomSheet2 }); }} />; };