decord/source/utils/ListUtils.tsx

44 lines
1.5 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 12177
// Function ID: 12178
2026-07-20 16:05:17 +00:00
// Name: getListSummaryLabel
2026-07-29 08:29:29 +00:00
// Dependencies: [1236, 2]
2026-07-20 16:05:17 +00:00
// Exports: getListSummaryLabel
2026-08-25 06:04:03 +00:00
// Module 12177 (getListSummaryLabel)
2026-08-24 06:08:38 +00:00
import set from "set" /* 2 */;
import getSystemLocale from "getSystemLocale" /* 1236 */;
const result = set.fileFinishedImporting("utils/ListUtils.tsx");
2026-07-20 16:05:17 +00:00
export const getListSummaryLabel = function getListSummaryLabel(names, length) {
2026-07-29 08:29:29 +00:00
let first = names;
if (length == null) {
length = first.length;
2026-07-20 16:05:17 +00:00
}
if (0 === length) {
return "";
} else if (1 === length) {
2026-08-24 06:08:38 +00:00
const intl4 = getSystemLocale.intl;
2026-07-29 08:29:29 +00:00
let obj = { first: null };
first = first[0];
obj[0] = first;
2026-08-24 06:08:38 +00:00
let formatToPlainStringResult = intl4.formatToPlainString(getSystemLocale.t["8s9z8P"], obj);
2026-07-20 16:05:17 +00:00
} else if (2 === length) {
2026-08-24 06:08:38 +00:00
const intl3 = getSystemLocale.intl;
2026-07-29 08:29:29 +00:00
obj = { first: null, second: null };
[obj3[0], obj3[1]] = first;
2026-08-24 06:08:38 +00:00
formatToPlainStringResult = intl3.formatToPlainString(getSystemLocale.t["i0K/dw"], obj);
2026-07-20 16:05:17 +00:00
} else if (3 === length) {
2026-08-24 06:08:38 +00:00
const intl2 = getSystemLocale.intl;
2026-07-29 08:29:29 +00:00
[obj2[0], obj2[1], obj2[2]] = first;
2026-08-24 06:08:38 +00:00
formatToPlainStringResult = intl2.formatToPlainString(getSystemLocale.t["/KSOKY"], { first: null, second: null, third: null });
obj1 = { first: null, second: null, third: null };
2026-07-20 16:05:17 +00:00
} else {
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
2026-07-29 08:29:29 +00:00
obj = { first: null, second: null, third: null, count: null };
[obj[0], obj[1], obj[2]] = first;
obj[3] = length - 3;
2026-08-24 06:08:38 +00:00
formatToPlainStringResult = intl.formatToPlainString(getSystemLocale.t.xpU76u, obj);
2026-07-20 16:05:17 +00:00
}
};