Files
discord-decomp/sources/modules/main_tabs_v2/useRecipientsLabel.tsx
T
2026-07-28 01:06:53 +03:00

78 lines
4.4 KiB
TypeScript

/* Metro module 12127; source: modules/main_tabs_v2/useRecipientsLabel.tsx; dependencies: [31, 1878, 1244, 566, 1360, 3995, 2] */
import UserStore from '../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import UserUtils from '../../utils/UserUtils.tsx'; /* Metro dependency 3995 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */
function _fun93048(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93048, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12313:6, offset: 0x020a445e, size: 137 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(FileImportTrackerModule).fileFinishedImporting('modules/main_tabs_v2/useRecipientsLabel.tsx');
exports.useRecipientsLabel = useRecipientsLabel;
function useRecipientsLabel(a0) { // fn#93049, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12313:214, offset: 0x020a44e7, size: 105 bytes, params: 2, frame: 16
const env0_0 = a0;
return ReactModule.useMemo(_fun93053, [a0,
(FluxModule).useStateFromStoresArray([UserStore], _fun93050)]);
function _fun93050() { // fn#93050, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12313:288, offset: 0x020a4550, size: 92 bytes, params: 1, frame: 14
var value;
value = Reflect.apply(env0_0.recipients.map(function(a0) {
return UserStore.getUser(a0);
}).filter, value, [(require(1360) /* metro dependency 1360: GlobalUtils */).isNotNullish]);
return value.map(_fun93052);
function _fun93052(a0) { // fn#93052, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12313:362, offset: 0x020a45ac, size: 41 bytes, params: 2, frame: 11
const value = environment.__proto__.__proto__;
return (UserUtils).getName(a0);
}
}
function _fun93053() { // fn#93053, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12313:406, offset: 0x020a45d5, size: 449 bytes, params: 1, frame: 21
var r1;
var r0;
var binding;
var value3;
const intl = (IndexNativeModule).intl;
const t = (IndexNativeModule).t;
var value;
const name = env0_0.name;
const value2 = null;
if (name === '') {
r0 = value2;
} else {
binding = env0_1;
if (binding.length === 0) {
r1 = value2;
} else if (binding.length === 1) {
value = environment.__proto__;
value = intl.formatToPlainString(t['J+Wpst'], {first: binding[0]});
r1 = value;
} else if (binding.length === 2) {
value = environment.__proto__;
value = intl.formatToPlainString(t.gwRP0Y, {first: binding[0], second: binding[1]});
r1 = value;
} else if (binding.length === 3) {
value = environment.__proto__;
value = intl.formatToPlainString(t.QDB5et, {first: binding[0], second: binding[1], third: binding[2]});
r1 = value;
} else {
value = binding.length - 3;
value3 = environment.__proto__;
value = intl.formatToPlainString(t.VYfueb, {first: binding[0], second: binding[1], third: binding[2],
count: value});
r1 = value;
}
r0 = r1;
}
return r0;
}
}
}
global.__d(_fun93048, 12127, [31, 1878, 1244, 566, 1360, 3995,
2]) /* metro module 12127, dependencies: [31, 1878, 1244, 566, 1360, 3995, 2] */;