Files
discord-decomp/sources/modules/notifications/settings/native/NotificationSettingsMessageNotification.tsx
T
2026-07-27 16:20:00 +03:00

102 lines
7.0 KiB
TypeScript

/* Metro module 10948; source: modules/notifications/settings/native/NotificationSettingsMessageNotification.tsx; dependencies: [31, 27, 33, 4501, 697, 10949, 4573, 1244, 5278, 10950, 10947, 4080, 10952, 1962, 10941, 10954, 2] */
function _fun83922(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11134:6, offset: 0x01f2e823, size: 361 bytes, params: 8, frame: 23
const env0_0 = require;
const closure = NotificationSettingsMessageNotification;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(33) /* metro dependency 33 */;
const env0_4 = value.jsx;
const env0_5 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object = {'backgroundColor': null, 'borderColor': null, 'borderRadius': 20, 'borderWidth': 1, 'padding': 14};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object.backgroundColor = BACKGROUND_BASE_LOWEST;
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object.borderColor = BACKGROUND_MOD_SUBTLE;
const env0_6 = Reflect.apply(createStyles, value, [{card: object, cta: {'textAlign': 'center', 'marginTop': 4},
label: {'textAlign': 'center', 'marginTop': 8}, header: {marginBottom: 8}, headerTitle: {marginBottom: 4}}]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/settings/native/NotificationSettingsMessageNotification.tsx');
exports.default = closure;
exports.NotificationSettingsGuildMessageNotification = NotificationSettingsGuildMessageNotification;
exports.NotificationSettingsChannelMessageNotification = NotificationSettingsChannelMessageNotification;
}
function NotificationSettingsMessageNotification(a0) { // fn#83923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11134:452, offset: 0x01f2e98c, size: 799 bytes, params: 2, frame: 34
const env0_0 = a0;
const value2 = undefined;
const styles = useStyles();
const value4 = (require(10949) /* metro dependency 10949: notificationSettingsPresetOptionUtils */).getPushNotificationSelectOptions().find(_fun83924);
const style = a0.style;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const view = <View style={styles.header}><Text variant="text-sm/semibold" color="text-default" style={styles.headerTitle}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1m22ZB'])}</Text><Text variant="text-xs/semibold" color="text-default">{a0.context === 'guild' ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['4bP2ZZ']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['R1j5+4'])}</Text></View>;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const pressableOpacityProps = {onPress: a0.onCustomize, activeOpacity: 0.6};
const items3 = [((Component) => <Component notificationSetting={a0.setting} />)(importDefault(10950) /* metro dependency 10950: NotificationSettingsMockMessage */)];
items3[1] = <Text variant="text-sm/medium" style={styles.label}>{(value4 == null ? value2 : value4.label) ?? 'unset'}</Text>;
const PressableOpacity2 = (require(5278) /* metro dependency 5278: Pressables */).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 NotificationSettingsGuildMessageNotification(a0) { // fn#83925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11134:1635, offset: 0x01f2ecc6, size: 108 bytes, params: 2, frame: 17
const env0_0 = a0;
const style = a0.style;
const value = require(10947) /* metro dependency 10947: notificationSettingsGuildFlagUtils */;
const useGuildPresetSettings = value.useGuildPresetSettings;
return (
<NotificationSettingsMessageNotification
context="guild"
style={style}
setting={Reflect.apply(useGuildPresetSettings, value, [a0.guildId]).notification}
onCustomize={onCustomize}
/>
);
}
function NotificationSettingsChannelMessageNotification(a0) { // fn#83927, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11134:2007, offset: 0x01f2ed94, size: 108 bytes, params: 2, frame: 17
const env0_0 = a0;
const style = a0.style;
const value = require(10941) /* metro dependency 10941: notficationSettingsChannelFlagUtils */;
const useChannelPresetSettings = value.useChannelPresetSettings;
return (
<NotificationSettingsMessageNotification
context="channel"
style={style}
setting={Reflect.apply(useChannelPresetSettings, value, [a0.channel]).notification}
onCustomize={onCustomize}
/>
);
}
function NotificationSettingsGuildMessageNotificationOnCustomize() { // fn#83926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11134:1848, owner: NotificationSettingsGuildMessageNotification.onCustomize, offset: 0x01f2ed32, 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, 'MessageNotificationGuildActionSheet', {guildId: env0_0.guildId}]);
}
function NotificationSettingsChannelMessageNotificationOnCustomize() { // fn#83928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11134:2226, owner: NotificationSettingsChannelMessageNotification.onCustomize, offset: 0x01f2ee00, 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, 'MessageNotificationChannelActionSheet', {channel: env0_0.channel}]);
}