Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4825.js (118.4 MB)
64 lines
2.5 KiB
TypeScript
64 lines
2.5 KiB
TypeScript
// Module ID: 11068
|
|
// Function ID: 11069
|
|
// Name: useRecipientsLabel
|
|
// Dependencies: [19, 1372, 1115, 504, 1370, 4484, 2]
|
|
// Exports: useRecipientsLabel
|
|
|
|
// Module 11068 (useRecipientsLabel)
|
|
import util from "util" /* 1115 */;
|
|
import GlobalUtils from "GlobalUtils" /* 1370 */;
|
|
import noop from "module_19" /* 19 */;
|
|
import UserStore from "UserStore" /* 1372 */;
|
|
|
|
const require = globalThis.__r;
|
|
|
|
require = fn;
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/main_tabs_v2/useRecipientsLabel.tsx");
|
|
|
|
export const useRecipientsLabel = function useRecipientsLabel(channel) {
|
|
_require = channel;
|
|
const items = [UserStore];
|
|
const stateFromStoresArray = require("initialize").useStateFromStoresArray(items, () => {
|
|
const recipients = channel.recipients;
|
|
const mapped = recipients.map((item) => user.getUser(item));
|
|
const found = mapped.filter(GlobalUtils.isNotNullish);
|
|
return found.map((item) => stateFromStoresArray(closure_1_2[5]).getName(item));
|
|
});
|
|
const items1 = [channel, stateFromStoresArray];
|
|
return noop.useMemo(() => {
|
|
if ("" === channel.name) {
|
|
return null;
|
|
} else {
|
|
let first = stateFromStoresArray;
|
|
let formatToPlainStringResult = null;
|
|
if (0 !== stateFromStoresArray.length) {
|
|
if (1 === first.length) {
|
|
const intl4 = util.intl;
|
|
const obj4 = { first: null };
|
|
first = first[0];
|
|
obj4.first = first;
|
|
formatToPlainStringResult = intl4.formatToPlainString(util.t["J+Wpst"], obj4);
|
|
} else {
|
|
if (2 === first.length) {
|
|
const intl3 = util.intl;
|
|
[obj3.first, obj3.second] = first;
|
|
formatToPlainStringResult = intl3.formatToPlainString(util.t.gwRP0Y, { first: null, second: null });
|
|
const obj7 = { first: null, second: null };
|
|
} else if (3 !== first.length) {
|
|
const diff = first.length - 3;
|
|
const intl = util.intl;
|
|
const obj = { first: null, second: null, third: null, count: null };
|
|
[obj.first, obj.second, obj.third] = first;
|
|
obj.count = diff;
|
|
formatToPlainStringResult = intl.formatToPlainString(util.t.VYfueb, obj);
|
|
}
|
|
const intl2 = util.intl;
|
|
[obj2.first, obj2.second, obj2.third] = first;
|
|
formatToPlainStringResult = intl2.formatToPlainString(util.t.QDB5et, { first: null, second: null, third: null });
|
|
const obj8 = { first: null, second: null, third: null };
|
|
}
|
|
}
|
|
}
|
|
}, items1);
|
|
};
|