decord/source/modules/notifications/settings/utils/notificationSettingsPresetOptionUtils.tsx

52 lines
2 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 10139
// Function ID: 10140
2026-07-20 16:05:17 +00:00
// Name: getPushNotificationSelectOptions
2026-08-24 06:08:38 +00:00
// Dependencies: [676, 5049, 1236, 2]
2026-07-20 16:05:17 +00:00
// Exports: getPushNotificationSelectOptions, getUnreadSelectOptions
2026-08-24 06:08:38 +00:00
// Module 10139 (getPushNotificationSelectOptions)
import set from "set" /* 2 */;
import ME from "ME" /* 676 */;
import getSystemLocale from "getSystemLocale" /* 1236 */;
import ReadStateTypes from "ReadStateTypes" /* 5049 */;
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
const UserNotificationSettings = ME.UserNotificationSettings;
const UnreadSetting = ReadStateTypes.UnreadSetting;
const result = set.fileFinishedImporting("modules/notifications/settings/utils/notificationSettingsPresetOptionUtils.tsx");
2026-07-20 16:05:17 +00:00
export const getPushNotificationSelectOptions = function getPushNotificationSelectOptions() {
2026-07-29 08:29:29 +00:00
let obj = { label: null, value: null };
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
obj[0] = intl.string(getSystemLocale.t["HVah/3"]);
2026-07-29 08:29:29 +00:00
obj[1] = UserNotificationSettings.ALL_MESSAGES;
2026-07-20 16:05:17 +00:00
const items = [obj, , ];
2026-07-29 08:29:29 +00:00
obj = { label: null, value: null };
2026-08-24 06:08:38 +00:00
const intl2 = getSystemLocale.intl;
obj[0] = intl2.string(getSystemLocale.t["tu+ZWJ"]);
2026-07-29 08:29:29 +00:00
obj[1] = UserNotificationSettings.ONLY_MENTIONS;
2026-07-20 16:05:17 +00:00
items[1] = obj;
2026-07-29 08:29:29 +00:00
obj = { label: null, value: null };
2026-08-24 06:08:38 +00:00
const intl3 = getSystemLocale.intl;
obj[0] = intl3.string(getSystemLocale.t.X4wWUi);
2026-07-29 08:29:29 +00:00
obj[1] = UserNotificationSettings.NO_MESSAGES;
2026-07-20 16:05:17 +00:00
items[2] = obj;
return items;
};
export const getUnreadSelectOptions = function getUnreadSelectOptions(notificationSetting) {
2026-07-29 08:29:29 +00:00
let obj = { label: null, value: null };
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
obj[0] = intl.string(getSystemLocale.t["HVah/3"]);
2026-07-29 08:29:29 +00:00
obj[1] = UnreadSetting.ALL_MESSAGES;
2026-07-20 16:05:17 +00:00
const items = [obj, ];
2026-07-29 08:29:29 +00:00
obj = { value: UnreadSetting.ONLY_MENTIONS, label: null, disabled: null };
2026-08-24 06:08:38 +00:00
const intl2 = getSystemLocale.intl;
obj[1] = intl2.string(getSystemLocale.t["tu+ZWJ"]);
2026-07-29 08:29:29 +00:00
notificationSetting = undefined;
if (notificationSetting != null) {
2026-07-20 16:05:17 +00:00
notificationSetting = notificationSetting.notificationSetting;
}
2026-07-29 08:29:29 +00:00
obj[2] = notificationSetting === UserNotificationSettings.ALL_MESSAGES;
2026-07-20 16:05:17 +00:00
items[1] = obj;
return items;
};