83 lines
4.7 KiB
TypeScript
83 lines
4.7 KiB
TypeScript
/* Metro module 4867; source: modules/notifications/settings/utils/notificationSettingsPresetUtils.tsx; dependencies: [661, 4865, 4242, 1244, 2] */
|
|
function _fun42613(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42613, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5045:6, offset: 0x0113e3a9, size: 217 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_2 = (require(661) /* metro dependency 661: Constants */).UserNotificationSettings;
|
|
const env0_3 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/settings/utils/notificationSettingsPresetUtils.tsx');
|
|
exports.Presets = {ALL_MESSAGES: 'all_messages', MENTIONS: 'mentions', NOTHING: 'nothing', CUSTOM: 'custom'};
|
|
exports.presetFromSettings = presetFromSettings;
|
|
exports.presetName = presetName;
|
|
exports.arePresetSettingsUnset = arePresetSettingsUnset;
|
|
}
|
|
|
|
function presetFromSettings(a0, a1) { // fn#42614, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5045:412, offset: 0x0113e482, size: 287 bytes, params: 3, frame: 16
|
|
const value2 = (require(4242) /* metro dependency 4242 */).match([a1, a0]);
|
|
let ALL_MESSAGES = UserNotificationSettings.ALL_MESSAGES;
|
|
items2 = [ALL_MESSAGES];
|
|
ALL_MESSAGES = UnreadSetting.ALL_MESSAGES;
|
|
items2[1] = ALL_MESSAGES;
|
|
let value = value2.with(items2, _fun42615);
|
|
let ONLY_MENTIONS = UserNotificationSettings.ONLY_MENTIONS;
|
|
let UNSET = UnreadSetting.UNSET;
|
|
value = value.with([ONLY_MENTIONS, UNSET], _fun42616);
|
|
ONLY_MENTIONS = UserNotificationSettings.ONLY_MENTIONS;
|
|
items2 = [ONLY_MENTIONS];
|
|
ONLY_MENTIONS = UnreadSetting.ONLY_MENTIONS;
|
|
items2[1] = ONLY_MENTIONS;
|
|
value = value.with(items2, _fun42617);
|
|
let NO_MESSAGES = UserNotificationSettings.NO_MESSAGES;
|
|
UNSET = UnreadSetting.UNSET;
|
|
value = value.with([NO_MESSAGES, UNSET], _fun42618);
|
|
NO_MESSAGES = UserNotificationSettings.NO_MESSAGES;
|
|
ONLY_MENTIONS = UnreadSetting.ONLY_MENTIONS;
|
|
value = value.with([NO_MESSAGES, ONLY_MENTIONS], _fun42619);
|
|
return value.otherwise(_fun42620);
|
|
}
|
|
|
|
function presetName(a0) { // fn#42621, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5045:778, offset: 0x0113e5dd, size: 149 bytes, params: 2, frame: 15
|
|
const value2 = (require(4242) /* metro dependency 4242 */).match(a0);
|
|
const binding = env0_4;
|
|
const ALL_MESSAGES = binding.ALL_MESSAGES;
|
|
let value = value2.with(ALL_MESSAGES, function() {
|
|
return require(dependencyMap[3]).intl.string(require(dependencyMap[3]).t.hZrr6k);
|
|
});
|
|
const MENTIONS = binding.MENTIONS;
|
|
value = value.with(MENTIONS, function() {
|
|
return require(dependencyMap[3]).intl.string(require(dependencyMap[3]).t.y59NJm);
|
|
});
|
|
const NOTHING = binding.NOTHING;
|
|
value = value.with(NOTHING, function() {
|
|
return require(dependencyMap[3]).intl.string(require(dependencyMap[3]).t['pGn/bJ']);
|
|
});
|
|
const CUSTOM = binding.CUSTOM;
|
|
value = value.with(CUSTOM, function() {
|
|
return require(dependencyMap[3]).intl.string(require(dependencyMap[3]).t['32yow9']);
|
|
});
|
|
return value.exhaustive();
|
|
}
|
|
|
|
function arePresetSettingsUnset(a0, a1) { // fn#42626, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5045:1115, offset: 0x0113e76a, size: 67 bytes, params: 3, frame: 5
|
|
let r0 = a0 != null && a0 !== UnreadSetting.UNSET;
|
|
r0 = !r0 ? a1 != null && a1 !== UserNotificationSettings.NULL : r0;
|
|
return !r0;
|
|
}
|
|
|
|
function _fun42615() { // fn#42615, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5045:511, offset: 0x0113e5a1, size: 15 bytes, params: 1, frame: 1
|
|
return env1_4.ALL_MESSAGES;
|
|
}
|
|
|
|
function _fun42616() { // fn#42616, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5045:564, offset: 0x0113e5b0, size: 15 bytes, params: 1, frame: 1
|
|
return env1_4.MENTIONS;
|
|
}
|
|
|
|
function _fun42618() { // fn#42618, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5045:668, offset: 0x0113e5bf, size: 15 bytes, params: 1, frame: 1
|
|
return env1_4.NOTHING;
|
|
}
|
|
|
|
function _fun42620() { // fn#42620, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5045:749, offset: 0x0113e5ce, size: 15 bytes, params: 1, frame: 1
|
|
return env1_4.CUSTOM;
|
|
}
|
|
|