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

94 lines
4.5 KiB
TypeScript
Raw Normal View History

// Module ID: 10254
// Function ID: 10255
2026-07-20 16:05:17 +00:00
// Name: NotificationSettingsMessageUnread
// Dependencies: [19, 17, 21, 4607, 576, 10248, 4603, 1114, 5175, 10255, 10246, 4574, 10257, 1896, 10240, 10259, 2]
2026-07-20 16:05:17 +00:00
// Exports: NotificationSettingsChannelMessageUnread, NotificationSettingsGuildMessageUnread
// Module 10254 (NotificationSettingsMessageUnread)
import nativeDefault from "native" /* 576 */;
import util from "util" /* 1114 */;
import asyncRequireImpl from "asyncRequireImpl" /* 1896 */;
import ActionSheetActionCreatorsDefault from "ActionSheetActionCreators" /* 4574 */;
import Text_Text from "Text/Text" /* 4603 */;
import Pressables from "Pressables" /* 5175 */;
import notificationSettingsPresetOptionUtils from "notificationSettingsPresetOptionUtils" /* 10248 */;
import NotificationSettingsMockChannelsDefault from "NotificationSettingsMockChannels" /* 10255 */;
import noop from "module_19" /* 19 */;
2026-07-23 10:11:24 +00:00
const require = globalThis.__r;
require = fn;
2026-07-20 16:05:17 +00:00
function NotificationSettingsMessageUnread(onPress) {
const tmp = closure_6();
const unreadSelectOptions = notificationSettingsPresetOptionUtils.getUnreadSelectOptions();
2026-07-23 10:11:24 +00:00
const found = unreadSelectOptions.find((value) => value.value === onPress.setting);
const obj2 = { style: onPress.style, children: null };
const obj3 = { style: tmp.header, children: null };
const obj4 = { variant: "text-sm/semibold", color: "text-default", style: tmp.headerTitle, children: null };
const intl = util.intl;
obj4.children = intl.string(util.t.Tqd1Af);
const items = [React4(Text_Text.Text, obj4), ];
const obj5 = { variant: "text-xs/semibold", color: "text-default", children: null };
const intl2 = util.intl;
obj5.children = intl2.string(util.t.RpQgm5);
items[1] = React4(Text_Text.Text, obj5);
obj3.children = items;
const items1 = [hasOwnProperty(View, obj3), ];
const obj6 = { onPress: onPress.onCustomize, activeOpacity: 0.6, children: null };
const obj7 = { style: tmp.card, children: null };
const items2 = [React4(NotificationSettingsMockChannelsDefault, { unreadSetting: onPress.setting }), , ];
const obj9 = { variant: "text-sm/medium", style: tmp.label, children: null };
2026-07-29 08:29:29 +00:00
let str;
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
}
obj9.children = str;
items2[1] = React4(Text_Text.Text, obj9);
const obj10 = { onPress: onPress.onCustomize, children: null };
const obj11 = { variant: "text-sm/semibold", style: tmp.cta, color: "text-brand", children: null };
const intl3 = tmp2(1114).intl;
const items3 = [intl3.string(util.t.yxiV9W), " "];
obj11.children = items3;
obj10.children = hasOwnProperty(Text_Text.Text, obj11);
items2[2] = React4(Pressables.PressableOpacity, obj10);
obj7.children = items2;
obj6.children = hasOwnProperty(View, obj7);
items1[1] = React4(Pressables.PressableOpacity, obj6);
obj2.children = items1;
return hasOwnProperty(View, obj2);
2026-07-20 16:05:17 +00:00
}
const View = fn(17).View;
const jsxProd = fn(21);
({ jsx: closure_4, jsxs: hasOwnProperty } = jsxProd);
const createStyles = fn(4607);
let obj2 = { card: { backgroundColor: nativeDefault.colors.BACKGROUND_BASE_LOWEST, borderColor: nativeDefault.colors.BACKGROUND_MOD_SUBTLE, borderRadius: 20, borderWidth: 1, padding: 14 }, cta: { marginTop: 4, textAlign: "center" }, label: { marginTop: 8, textAlign: "center" }, header: { marginBottom: 8 }, headerTitle: { marginBottom: 4 } };
let closure_6 = createStyles.createStyles(obj2);
const size = fn(2);
const result = size.fileFinishedImporting("modules/notifications/settings/native/NotificationSettingsMessageUnread.tsx");
2026-07-20 16:05:17 +00:00
export const NotificationSettingsGuildMessageUnread = function NotificationSettingsGuildMessageUnread(style) {
_require = style;
const obj = {
2026-08-24 06:08:38 +00:00
style: style.style,
setting: require("notificationSettingsGuildFlagUtils").useGuildPresetSettings(style.guildId).unread,
2026-08-24 06:08:38 +00:00
onCustomize() {
ActionSheetActionCreatorsDefault.openLazy(asyncRequireImpl(10257, dependencyMap.paths), "MessageUnreadActionSheet", { guildId: style.guildId });
2026-08-24 06:08:38 +00:00
}
2026-07-20 16:05:17 +00:00
};
return closure_4(NotificationSettingsMessageUnread, obj);
2026-07-20 16:05:17 +00:00
};
export const NotificationSettingsChannelMessageUnread = function NotificationSettingsChannelMessageUnread(style) {
_require = style;
const obj = {
2026-08-24 06:08:38 +00:00
style: style.style,
setting: require("notficationSettingsChannelFlagUtils").useChannelPresetSettings(style.channel).unread,
2026-08-24 06:08:38 +00:00
onCustomize() {
ActionSheetActionCreatorsDefault.openLazy(asyncRequireImpl(10259, dependencyMap.paths), "MessageUnreadActionSheet", { channel: style.channel });
2026-08-24 06:08:38 +00:00
}
2026-07-20 16:05:17 +00:00
};
return closure_4(NotificationSettingsMessageUnread, obj);
2026-07-20 16:05:17 +00:00
};