decord/source/modules/threads/ThreadAutoArchive.tsx

68 lines
2.5 KiB
TypeScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 6185
// Function ID: 6186
2026-07-20 16:05:17 +00:00
// Name: getAutoArchiveOptions
2026-07-29 08:29:29 +00:00
// Dependencies: [1235, 687, 1236, 731, 3771, 2]
2026-07-20 16:05:17 +00:00
// Exports: getAutoArchiveDuration, getAutoArchiveDurationText
2026-07-29 08:29:29 +00:00
// Module 6185 (getAutoArchiveOptions)
2026-07-23 10:11:24 +00:00
import { DEFAULT_AUTO_ARCHIVE_DURATION as closure_3 } from "AbortCodes";
2026-07-22 07:54:56 +00:00
2026-07-20 16:05:17 +00:00
function getAutoArchiveOptions() {
2026-07-29 08:29:29 +00:00
let obj = { id: "1hour", label: null, value: null };
const intl = require(1236) /* getSystemLocale */.intl;
obj[1] = intl.string(require(1236) /* getSystemLocale */.t.cs8A1c);
obj[2] = importDefault(687).Minutes.HOUR;
2026-07-20 16:05:17 +00:00
const items = [obj, , , ];
2026-07-29 08:29:29 +00:00
obj = { id: "24hours", label: null, value: null };
const intl2 = require(1236) /* getSystemLocale */.intl;
obj[1] = intl2.string(require(1236) /* getSystemLocale */.t.zFKbrF);
obj[2] = importDefault(687).Minutes.DAY;
2026-07-20 16:05:17 +00:00
items[1] = obj;
2026-07-29 08:29:29 +00:00
obj = { id: "3days", label: null, value: null };
const intl3 = require(1236) /* getSystemLocale */.intl;
obj[1] = intl3.string(require(1236) /* getSystemLocale */.t.TmPIZX);
obj[2] = 3 * importDefault(687).Minutes.DAY;
2026-07-20 16:05:17 +00:00
items[2] = obj;
2026-07-29 08:29:29 +00:00
const obj1 = { id: "1week", label: null, value: null };
const intl4 = require(1236) /* getSystemLocale */.intl;
obj1[1] = intl4.string(require(1236) /* getSystemLocale */.t["/7i2el"]);
obj1[2] = importDefault(687).Minutes.WEEK;
2026-07-20 16:05:17 +00:00
items[3] = obj1;
return items;
}
2026-07-23 10:11:24 +00:00
let items = [require("set").Minutes.HOUR, require("set").Minutes.DAY, 3 * require("set").Minutes.DAY, require("set").Minutes.WEEK];
const tmp2 = require("memoize")(() => getAutoArchiveOptions().map((value) => value.value));
const result = require("getSystemLocale").fileFinishedImporting("modules/threads/ThreadAutoArchive.tsx");
2026-07-20 16:05:17 +00:00
export const AUTO_ARCHIVE_OPTION_VALUES = items;
export { getAutoArchiveOptions };
2026-07-23 10:11:24 +00:00
export const getAutoArchiveDurations = tmp2;
2026-07-20 16:05:17 +00:00
export const getAutoArchiveDurationText = function getAutoArchiveDurationText(arg0) {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0;
const found = getAutoArchiveOptions().find((value) => value.value === closure_0);
2026-07-20 16:05:17 +00:00
let label;
2026-07-29 08:29:29 +00:00
if (found != null) {
2026-07-20 16:05:17 +00:00
label = found.label;
}
2026-07-29 08:29:29 +00:00
if (label == null) {
const obj = importDefault(3771);
label = importDefault(3771).duration(arg0, "minutes").humanize();
const durationResult = importDefault(3771).duration(arg0, "minutes");
2026-07-20 16:05:17 +00:00
}
return label;
};
export const getAutoArchiveDuration = function getAutoArchiveDuration(channel, arg1) {
let tmp = arg1;
2026-07-29 08:29:29 +00:00
if (arg1 == null) {
2026-07-20 16:05:17 +00:00
let prop;
2026-07-29 08:29:29 +00:00
if (channel != null) {
2026-07-20 16:05:17 +00:00
prop = channel.defaultAutoArchiveDuration;
}
tmp = prop;
}
2026-07-29 08:29:29 +00:00
if (tmp == null) {
2026-07-20 16:05:17 +00:00
tmp = closure_3;
}
return tmp;
};