/* Metro module 10586; source: modules/activities/utils/InviteEmbedTextUtils.tsx; dependencies: [1878, 661, 1244, 2678, 4617, 2] */ import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */ import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */ import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */ function _fun81670(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81670, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10772:6, offset: 0x01ed9388, size: 202 bytes, params: 8, frame: 21 const env0_0 = require; const getRequestToStreamText2 = getRequestToStreamText; const getAskToJoinText2 = getAskToJoinText; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); (FileImportTrackerModule).fileFinishedImporting('modules/activities/utils/InviteEmbedTextUtils.tsx'); exports.getHeaderText = getHeaderText_81673; exports.getRequestToStreamText = getRequestToStreamText2; exports.getAskToJoinText = getAskToJoinText2; exports.getDeadGameInviteText = getDeadGameInviteText; exports.getPartyText = getPartyText; function getRequestToStreamText(a0, a1, a2) { // fn#81671, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10772:136, offset: 0x01ed9452, size: 205 bytes, params: 4, frame: 20 var r0; var value; const intl = (IndexNativeModule).intl; var formatToPlainString; var property; if (a0.author.id === a2) { r0 = intl.string((importDefault(2678) /* metro dependency 2678: RequestToStreamMessages */)['8B3U5O']); } else { formatToPlainString = intl.formatToPlainString; property = (importDefault(2678) /* metro dependency 2678: RequestToStreamMessages */)['d/qbC0']; value = require(4617) /* metro dependency 4617: NicknameUtils */; value = Reflect.apply(formatToPlainString, intl, [property, {username: value.getName(a1.guild_id, a1.id, a0.author)}]); r0 = value; } return r0; } function getAskToJoinText(a0, a1, a2, a3, a4) { // fn#81672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10772:342, offset: 0x01ed951f, size: 425 bytes, params: 6, frame: 19 const intl = (IndexNativeModule).intl; var formatToPlainString; const t = (IndexNativeModule).t; var userStoreBinding; var value2; if (a0.author.id === a3) { if (a2.isPrivate()) { userStoreBinding = UserStore; value2 = userStoreBinding.getUser(a2.getRecipientId()); if (value2 != null) { formatToPlainString = intl.formatToPlainString; return a4 ? Reflect.apply(formatToPlainString, intl, [t.JddpN2, {username: value2.globalName, appName: a1}]) : Reflect.apply(formatToPlainString, intl, [t.gYVkSW, {username: value2.globalName, appName: a1}]); } formatToPlainString = intl.formatToPlainString; return a4 ? Reflect.apply(formatToPlainString, intl, [t['2N1kNS'], {appName: a1}]) : Reflect.apply(formatToPlainString, intl, [t.IA6uDV, {appName: a1}]); } formatToPlainString = intl.formatToPlainString; return a4 ? Reflect.apply(formatToPlainString, intl, [t['2N1kNS'], {appName: a1}]) : Reflect.apply(formatToPlainString, intl, [t.IA6uDV, {appName: a1}]); } formatToPlainString = intl.formatToPlainString; return a4 ? Reflect.apply(formatToPlainString, intl, [t.XE8axA, {username: a0.author.globalName, appName: a1}]) : Reflect.apply(formatToPlainString, intl, [t.hgcjOn, {username: a0.author.globalName, appName: a1}]); } function getHeaderText_81673(a0, a1, a2) { // fn#81673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10772:1073, offset: 0x01ed96c8, size: 411 bytes, params: 4, frame: 18 const intl = (IndexNativeModule).intl; const t = (IndexNativeModule).t; const LISTEN = ActivityActionTypes.LISTEN; if (LISTEN === a1) { return intl.formatToPlainString(t['/8czH4'], {name: a0}); } const WATCH = ActivityActionTypes.WATCH; if (WATCH === a1) { return intl.formatToPlainString(t.BBJXVk, {name: a0}); } const JOIN = ActivityActionTypes.JOIN; if (JOIN === a1) { return a2 ? undefined : intl.string(t.pkq6Vq); } const STREAM_REQUEST = ActivityActionTypes.STREAM_REQUEST; if (STREAM_REQUEST === a1) { return intl.string((importDefault(2678) /* metro dependency 2678: RequestToStreamMessages */).DKHhec); } ActivityActionTypes.JOIN_REQUEST; const string = intl.string; const Ckxb6j = t.Ckxb6j; return Reflect.apply(string, intl, [Ckxb6j]); } function getDeadGameInviteText(a0, a1, a2, a3, a4) { // fn#81674, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10772:1591, offset: 0x01ed9863, size: 224 bytes, params: 6, frame: 20 const intl = (IndexNativeModule).intl; const t = (IndexNativeModule).t; const type = a0.activity?.type; const LISTEN = ActivityActionTypes.LISTEN; if (LISTEN === type) { return intl.string(a4 ? t.x1UXGR : t['Ek+51n']); } const WATCH = ActivityActionTypes.WATCH; if (WATCH === type) { return intl.string(a4 ? t.x1UXGR : t['Ek+51n']); } const JOIN = ActivityActionTypes.JOIN; if (JOIN === type) { return intl.string(a4 ? t.x1UXGR : t['Ek+51n']); } const STREAM_REQUEST = ActivityActionTypes.STREAM_REQUEST; if (STREAM_REQUEST === type) { return getRequestToStreamText(a0, a2, a3); } ActivityActionTypes.JOIN_REQUEST; return getAskToJoinText(a0, a1, a2, a3, true); } function getPartyText({activityActionType, maxPartySize, partySize}) { // fn#81675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10772:1928, offset: 0x01ed9943, size: 369 bytes, params: 2, frame: 20 const intl = (IndexNativeModule).intl; const t = (IndexNativeModule).t; const STREAM_REQUEST = ActivityActionTypes.STREAM_REQUEST; return activityActionType === STREAM_REQUEST ? '' : activityActionType === ActivityActionTypes.LISTEN ? maxPartySize > 0 ? intl.formatToPlainString(t.Zogoou, {partySize: partySize, maxPartySize: maxPartySize}) : intl.formatToPlainString(t.UGei0j, {partySize: partySize}) : maxPartySize > 0 ? intl.formatToPlainString(t.gLu7NU, {partySize: partySize, maxPartySize: maxPartySize}) : intl.formatToPlainString(t['65JnWC'], {partySize: partySize}); } } global.__d(_fun81670, 10586, [1878, 661, 1244, 2678, 4617, 2]) /* metro module 10586, dependencies: [1878, 661, 1244, 2678, 4617, 2] */;