60 lines
3.7 KiB
TypeScript
60 lines
3.7 KiB
TypeScript
/* Metro module 9523; source: modules/quests/utils/MobileQuestVideoWatchCtaCopy.tsx; dependencies: [7116, 1244, 2] */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as QuestTaskUtilsModule from './QuestTaskUtils.tsx'; /* Metro dependency 7116 */
|
|
|
|
function _fun74303(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74303, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9709:6, offset: 0x01d896a8, size: 128 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const formatWatchRemainingDurationShort2 = formatWatchRemainingDurationShort;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/quests/utils/MobileQuestVideoWatchCtaCopy.tsx');
|
|
exports.formatWatchRemainingDurationShort = formatWatchRemainingDurationShort2;
|
|
exports.getVideoQuestWatchCtaText = function(a0) {
|
|
var value = a0.percentComplete > 0;
|
|
var value3 = formatWatchRemainingDurationShort(a0);
|
|
var intl = require(dependencyMap[1]).intl;
|
|
var formatToPlainString = intl.formatToPlainString;
|
|
var t = require(dependencyMap[1]).t;
|
|
return value ? Reflect.apply(formatToPlainString, intl, [t['pF/deA'],
|
|
{durationShort: value3}]) : Reflect.apply(formatToPlainString, intl, [t.CHrvqg, {durationShort: value3}]);
|
|
};
|
|
exports.getVideoQuestWatchCtaAccessibilityLabel = getVideoQuestWatchCtaAccessibilityLabel;
|
|
function formatWatchRemainingDurationShort(a0) { // fn#74304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9709:43, offset: 0x01d89728, size: 219 bytes, params: 2, frame: 18
|
|
var r0;
|
|
const intl = (IndexNativeModule).intl;
|
|
var formatToPlainString;
|
|
const t = (IndexNativeModule).t;
|
|
var object;
|
|
var PHhTXX;
|
|
const remainingTaskTime = (QuestTaskUtilsModule).getRemainingTaskTime(a0);
|
|
const value4 = 60 * remainingTaskTime.minutes + remainingTaskTime.seconds;
|
|
if (value4 >= 60) {
|
|
formatToPlainString = intl.formatToPlainString;
|
|
PHhTXX = t.PHhTXX;
|
|
object = {};
|
|
object.count = global.Math.round(value4 / 60);
|
|
r0 = Reflect.apply(formatToPlainString, intl, [PHhTXX, object]);
|
|
} else {
|
|
r0 = intl.formatToPlainString(t.rUfeQx, {count: value4});
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function getVideoQuestWatchCtaAccessibilityLabel(a0) { // fn#74306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9709:832, offset: 0x01d8987d, size: 364 bytes, params: 2, frame: 20
|
|
const intl = (IndexNativeModule).intl;
|
|
const t = (IndexNativeModule).t;
|
|
const value = a0.percentComplete > 0;
|
|
const {minutes, seconds} = (QuestTaskUtilsModule).getRemainingTaskTime(a0);
|
|
const r5 = minutes > 0 && seconds > 0 ? intl.formatToPlainString(t['lW/66D'], {minutes: minutes,
|
|
seconds: seconds}) : minutes > 0 ? intl.formatToPlainString(t['SxnF/O'],
|
|
{count: minutes}) : intl.formatToPlainString(t['0BZpdi'], {count: seconds});
|
|
const formatToPlainString = intl.formatToPlainString;
|
|
return value ? Reflect.apply(formatToPlainString, intl, [t['ch+yrN'],
|
|
{remainTime: r5}]) : Reflect.apply(formatToPlainString, intl, [t.Bwc5Dg, {remainTime: r5}]);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun74303, 9523, [7116, 1244, 2]) /* metro module 9523, dependencies: [7116, 1244, 2] */;
|