decord/source/modules/notifications/settings/native/NotificationSettingsMessageNotification.tsx

115 lines
5.1 KiB
TypeScript
Raw Normal View History

// Module ID: 10156
// Function ID: 10157
2026-07-20 16:05:17 +00:00
// Name: NotificationSettingsMessageNotification
// Dependencies: [19, 17, 21, 4560, 576, 10157, 4556, 1114, 5123, 10158, 10155, 4527, 10160, 1896, 10149, 10162, 2]
2026-07-20 16:05:17 +00:00
// Exports: NotificationSettingsChannelMessageNotification, NotificationSettingsGuildMessageNotification
// Module 10156 (NotificationSettingsMessageNotification)
2026-08-24 06:08:38 +00:00
import noopAll from "noop" /* 19 */;
import ThemesDefault from "Themes" /* 576 */;
import NotificationSettingsMockMessageDefault from "NotificationSettingsMockMessage" /* 10158 */;
2026-08-24 06:08:38 +00:00
import { View } from "get ActivityIndicator" /* 17 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4560 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-20 16:05:17 +00:00
class NotificationSettingsMessageNotification {
constructor(arg0) {
2026-07-23 10:11:24 +00:00
closure_0 = global;
2026-08-24 06:08:38 +00:00
tmp = closure_6();
2026-07-29 08:29:29 +00:00
tmp2 = closure_0;
tmp3 = closure_2;
2026-07-23 10:11:24 +00:00
obj = require("getPushNotificationSelectOptions");
2026-07-20 16:05:17 +00:00
pushNotificationSelectOptions = obj.getPushNotificationSelectOptions();
2026-07-23 10:11:24 +00:00
found = pushNotificationSelectOptions.find((value) => value.value === onPress.setting);
2026-07-20 16:05:17 +00:00
tmp5 = jsxs;
tmp6 = View;
2026-07-29 08:29:29 +00:00
obj = { style: global.style, children: null };
obj1 = { style: tmp.header, children: null };
tmp7 = jsx;
obj2 = { variant: "text-sm/semibold", color: "text-default", style: tmp.headerTitle, children: null };
2026-07-23 10:11:24 +00:00
intl = require("getSystemLocale").intl;
2026-07-29 08:29:29 +00:00
obj2[3] = intl.string(require("getSystemLocale").t["1m22ZB"]);
2026-07-20 16:05:17 +00:00
items = [, ];
2026-07-23 10:11:24 +00:00
items[0] = jsx(require("Text").Text, obj2);
2026-07-20 16:05:17 +00:00
if ("guild" === global.context) {
2026-07-23 10:11:24 +00:00
intl3 = require("getSystemLocale").intl;
stringResult = intl3.string(require("getSystemLocale").t["4bP2ZZ"]);
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
intl2 = require("getSystemLocale").intl;
stringResult = intl2.string(require("getSystemLocale").t["R1j5+4"]);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
items[1] = tmp7(require("Text").Text, { variant: "text-xs/semibold", color: "text-default", children: stringResult });
obj1[1] = items;
2026-07-20 16:05:17 +00:00
items1 = [, ];
items1[0] = tmp5(tmp6, obj1);
2026-07-29 08:29:29 +00:00
obj3 = { onPress: global.onCustomize, activeOpacity: 0.6, children: null };
obj4 = { style: tmp.card, children: null };
obj5 = { notificationSetting: global.setting };
2026-07-20 16:05:17 +00:00
items2 = [, , ];
2026-07-29 08:29:29 +00:00
items2[0] = tmp7(require("NotificationSettingsMockMessage"), obj5);
obj6 = { variant: "text-sm/medium", style: tmp.label, children: null };
str = undefined;
if (found != null) {
str = found.label;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (str == null) {
str = "unset";
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj6[2] = str;
items2[1] = tmp7(require("Text").Text, obj6);
obj7 = { onPress: global.onCustomize, children: null };
obj8 = { variant: "text-sm/semibold", style: tmp.cta, color: "text-brand", children: null };
2026-07-23 10:11:24 +00:00
intl4 = require("getSystemLocale").intl;
2026-07-29 08:29:29 +00:00
obj8[3] = intl4.string(require("getSystemLocale").t.yxiV9W);
obj7[1] = tmp7(require("Text").Text, obj8);
items2[2] = tmp7(require("PressableBase").PressableOpacity, obj7);
obj4[1] = items2;
obj3[2] = tmp5(tmp6, obj4);
items1[1] = tmp7(require("PressableBase").PressableOpacity, obj3);
obj[1] = items1;
return tmp5(tmp6, obj);
2026-07-20 16:05:17 +00:00
}
}
2026-08-24 06:08:38 +00:00
noopAll;
2026-07-29 08:29:29 +00:00
({ jsx: c4, jsxs: c5 } = jsxProd);
createCacheKey = { card: null, cta: null, label: null, header: null, headerTitle: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { backgroundColor: ThemesDefault.colors.BACKGROUND_BASE_LOWEST, borderColor: ThemesDefault.colors.BACKGROUND_MOD_SUBTLE, borderRadius: 20, borderWidth: 1, padding: 14 };
2026-07-29 08:29:29 +00:00
createCacheKey[0] = createCacheKey;
createCacheKey[1] = { textAlign: "center", marginTop: 4 };
createCacheKey[2] = { textAlign: "center", marginTop: 8 };
createCacheKey[3] = { marginBottom: 8 };
createCacheKey[4] = { marginBottom: 4 };
2026-08-24 06:08:38 +00:00
let closure_6 = createCacheKey.createStyles(createCacheKey);
const result = require("set").fileFinishedImporting("modules/notifications/settings/native/NotificationSettingsMessageNotification.tsx");
2026-07-20 16:05:17 +00:00
export default NotificationSettingsMessageNotification;
export const NotificationSettingsGuildMessageNotification = function NotificationSettingsGuildMessageNotification(style) {
2026-07-23 10:11:24 +00:00
const _require = style;
2026-08-24 06:08:38 +00:00
let obj = {
context: "guild",
style: style.style,
setting: _require(10155).useGuildPresetSettings(style.guildId).notification,
2026-08-24 06:08:38 +00:00
onCustomize() {
let obj = closure_1_1(closure_1_2[11]);
obj = { guildId: style.guildId };
obj.openLazy(style(closure_1_2[13])(closure_1_2[12], closure_1_2.paths), "MessageNotificationGuildActionSheet", obj);
}
2026-07-20 16:05:17 +00:00
};
return callback(NotificationSettingsMessageNotification, obj);
};
export const NotificationSettingsChannelMessageNotification = function NotificationSettingsChannelMessageNotification(style) {
2026-07-23 10:11:24 +00:00
const _require = style;
2026-08-24 06:08:38 +00:00
let obj = {
context: "channel",
style: style.style,
setting: _require(10149).useChannelPresetSettings(style.channel).notification,
2026-08-24 06:08:38 +00:00
onCustomize() {
let obj = closure_1_1(closure_1_2[11]);
obj = { channel: style.channel };
obj.openLazy(style(closure_1_2[13])(closure_1_2[15], closure_1_2.paths), "MessageNotificationChannelActionSheet", obj);
}
2026-07-20 16:05:17 +00:00
};
return callback(NotificationSettingsMessageNotification, obj);
};