26 lines
1.3 KiB
TypeScript
26 lines
1.3 KiB
TypeScript
// Metro module 9095 (f9096).
|
|
import { useMemo } from "react";
|
|
import UserStore from "../../stores/UserStore";
|
|
import { intl, t } from "../../intl/index.native";
|
|
import { useStateFromStoresArray } from "../../_bundle/Module589";
|
|
import { isNotNullish } from "../../utils/GlobalUtils";
|
|
import UserUtils from "../../utils/UserUtils";
|
|
export function useRecipientsLabel(a0) {
|
|
const stateFromStoresArray = useStateFromStoresArray([UserStore], () => a0.recipients.map((recipient) => UserStore.getUser(recipient)).filter(isNotNullish).map((item) => UserUtils.getName(item)));
|
|
return useMemo(() => a0.name !== "" ? stateFromStoresArray.length !== 0 ? stateFromStoresArray.length === 1 ? intl.formatToPlainString(t["J+Wpst"], {
|
|
first: stateFromStoresArray[0]
|
|
}) : stateFromStoresArray.length === 2 ? intl.formatToPlainString(t.gwRP0Y, {
|
|
first: stateFromStoresArray[0],
|
|
second: stateFromStoresArray[1]
|
|
}) : stateFromStoresArray.length === 3 ? intl.formatToPlainString(t.QDB5et, {
|
|
first: stateFromStoresArray[0],
|
|
second: stateFromStoresArray[1],
|
|
third: stateFromStoresArray[2]
|
|
}) : intl.formatToPlainString(t.VYfueb, {
|
|
first: stateFromStoresArray[0],
|
|
second: stateFromStoresArray[1],
|
|
third: stateFromStoresArray[2],
|
|
count: stateFromStoresArray.length - 3
|
|
}) : null : null, [a0, stateFromStoresArray]);
|
|
}
|