Files
discord-decomp/sources/modules/notifications/settings/native/NotificationSettingsMessageUnread.tsx
T
2026-07-28 01:06:53 +03:00

152 lines
9.0 KiB
TypeScript

/* Metro module 10955; source: modules/notifications/settings/native/NotificationSettingsMessageUnread.tsx; dependencies: [31, 27, 33, 4501, 697, 10949, 4573, 1244, 5278, 10956, 10947, 4080, 10958, 1962, 10941, 10960, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import NotificationSettingsMockChannels from './NotificationSettingsMockChannels.tsx'; /* Metro dependency 10956 */
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as NotficationSettingsChannelFlagUtilsModule from '../utils/notficationSettingsChannelFlagUtils.tsx'; /* Metro dependency 10941 */
import * as NotificationSettingsGuildFlagUtilsModule from '../utils/notificationSettingsGuildFlagUtils.tsx'; /* Metro dependency 10947 */
import * as NotificationSettingsPresetOptionUtilsModule from '../utils/notificationSettingsPresetOptionUtils.tsx'; /* Metro dependency 10949 */
function _fun83946(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83946, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11141:6, offset: 0x01f2ffb9, size: 351 bytes, params: 8, frame: 22
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
ReactModule;
let value = JsxRuntimeModule;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object2 = {'backgroundColor': null, 'borderColor': null, 'borderRadius': 20, 'borderWidth': 1, 'padding': 14};
const BACKGROUND_BASE_LOWEST = (Native).colors.BACKGROUND_BASE_LOWEST;
object2.backgroundColor = BACKGROUND_BASE_LOWEST;
const BACKGROUND_MOD_SUBTLE = (Native).colors.BACKGROUND_MOD_SUBTLE;
object2.borderColor = BACKGROUND_MOD_SUBTLE;
const env0_6 = Reflect.apply(createStyles, value, [{card: object2, cta: {'marginTop': 4, 'textAlign': 'center'},
label: {'marginTop': 8, 'textAlign': 'center'}, header: {marginBottom: 8}, headerTitle: {marginBottom: 4}}]);
(FileImportTrackerModule).fileFinishedImporting('modules/notifications/settings/native/NotificationSettingsMessageUnread.tsx');
exports.NotificationSettingsGuildMessageUnread = NotificationSettingsGuildMessageUnread;
exports.NotificationSettingsChannelMessageUnread = NotificationSettingsChannelMessageUnread;
function NotificationSettingsMessageUnread(a0) { // fn#83947, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11141:452, offset: 0x01f30118, size: 730 bytes, params: 2, frame: 34
const env0_0 = a0;
const value2 = undefined;
const styles = useStyles();
const value4 = (NotificationSettingsPresetOptionUtilsModule).getUnreadSelectOptions().find(_fun83948);
const style = a0.style;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const Tqd1Af = (require(1244) /* metro dependency 1244: indexNative */).t.Tqd1Af;
const text = (
<Text
variant="text-sm/semibold"
color="text-default"
style={styles.headerTitle}
>
{Reflect.apply(string, intl, [Tqd1Af])}
</Text>
);
string = intl.string;
const RpQgm5 = (require(1244) /* metro dependency 1244: indexNative */).t.RpQgm5;
const view = (
<View style={styles.header}>
{text}
<Text variant="text-xs/semibold" color="text-default">
{Reflect.apply(string, intl, [RpQgm5])}
</Text>
</View>
);
const PressableOpacity = (PressablesModule).PressableOpacity;
const pressableOpacityProps = {onPress: a0.onCustomize, activeOpacity: 0.6};
const items3 = [
((Component) => <Component unreadSetting={a0.setting} />)(NotificationSettingsMockChannels),
];
items3[1] = (
<Text variant="text-sm/medium" style={styles.label}>
{(value4 == null ? value2 : value4.label) ?? 'unset'}
</Text>
);
const PressableOpacity2 = (PressablesModule).PressableOpacity;
items3[2] = (
<PressableOpacity2 onPress={a0.onCustomize}>
<Text
variant="text-sm/semibold"
style={styles.cta}
color="text-brand"
>
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.yxiV9W)}
{' '}
</Text>
</PressableOpacity2>
);
return (
<View style={style}>
{view}
<PressableOpacity {...pressableOpacityProps}>
<View style={styles.card}>
{items3}
</View>
</PressableOpacity>
</View>
);
function _fun83948({value}) { // fn#83948, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11141:551, offset: 0x01f2ecab, size: 27 bytes, params: 2, frame: 2
return value === env0_0.setting;
}
}
function NotificationSettingsGuildMessageUnread(a0) { // fn#83949, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11141:1490, offset: 0x01f303f2, size: 100 bytes, params: 2, frame: 17
const env0_0 = a0;
const style = a0.style;
const useGuildPresetSettings = NotificationSettingsGuildFlagUtilsModule.useGuildPresetSettings;
return (
<NotificationSettingsMessageUnread
style={style}
setting={Reflect.apply(useGuildPresetSettings, NotificationSettingsGuildFlagUtilsModule, [a0.guildId]).unread}
onCustomize={onCustomize}
/>
);
function NotificationSettingsGuildMessageUnreadOnCustomize() { // fn#83950, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11141:1669, owner: NotificationSettingsGuildMessageUnread.onCustomize, offset: 0x01f30456, size: 98 bytes, params: 1, frame: 16
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[11]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[13]);
value = value(dependencyMap[12], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'MessageUnreadActionSheet', {guildId: env0_0.guildId}]);
}
}
function NotificationSettingsChannelMessageUnread(a0) { // fn#83951, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11141:1811, offset: 0x01f304b8, size: 100 bytes, params: 2, frame: 17
const env0_0 = a0;
const style = a0.style;
const useChannelPresetSettings = NotficationSettingsChannelFlagUtilsModule.useChannelPresetSettings;
return (
<NotificationSettingsMessageUnread
style={style}
setting={Reflect.apply(useChannelPresetSettings, NotficationSettingsChannelFlagUtilsModule, [a0.channel]).unread}
onCustomize={onCustomize}
/>
);
function NotificationSettingsChannelMessageUnreadOnCustomize() { // fn#83952, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11141:1994, owner: NotificationSettingsChannelMessageUnread.onCustomize, offset: 0x01f3051c, size: 98 bytes, params: 1, frame: 16
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[11]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[13]);
value = value(dependencyMap[15], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport, [value, 'MessageUnreadActionSheet', {channel: env0_0.channel}]);
}
}
}
global.__d(_fun83946, 10955, [31, 27, 33, 4501, 697, 10949, 4573, 1244, 5278, 10956, 10947, 4080, 10958, 1962,
10941, 10960,
2]) /* metro module 10955, dependencies: [31, 27, 33, 4501, 697, 10949, 4573, 1244, 5278, 10956, 10947, 4080, 10958, 1962, 10941, 10960, 2] */;