/* Metro module 10934; source: components_native/InAppNotificationSettingsModal.tsx; dependencies: [6, 7, 15, 17, 18, 31, 1383, 1379, 3793, 4864, 1878, 661, 33, 6613, 6610, 7007, 4805, 7972, 1244, 10935, 566, 5282, 5280, 2] */ function _fun83807(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83807, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:6, offset: 0x01f29707, size: 414 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importDefault(6) /* metro dependency 6 */; const env0_4 = importDefault(7) /* metro dependency 7 */; const env0_5 = importDefault(15) /* metro dependency 15 */; const env0_6 = importDefault(17) /* metro dependency 17 */; const env0_7 = importDefault(18) /* metro dependency 18 */; let value = importAll(31) /* metro dependency 31 */; const env0_9 = (require(1383) /* metro dependency 1383: ChannelRecord */).isMultiUserDM; const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */; const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */; const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */; const userStore = importDefault(1878) /* metro dependency 1878: UserStore */; const constantsModule = require(661) /* metro dependency 661: Constants */; const env0_14 = constantsModule.ChannelTypes; const env0_15 = constantsModule.UserSettingsSections; const value3 = require(33) /* metro dependency 33 */; const env0_16 = value3.jsx; const env0_17 = value3.jsxs; const PureComponent = value.PureComponent; const env0_18 = _fun83816(PureComponent); value = value.memo(_fun83824); (require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/InAppNotificationSettingsModal.tsx'); exports.default = value; } function _isNativeReflectConstruct_83808() { // fn#83808, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:304, offset: 0x01f298a5, size: 98 bytes, params: 1, frame: 18 var Boolean; var prototype; var valueOf; var call; var Reflect; var construct; var closure; var value; var error; try { Boolean = global.Boolean; prototype = Boolean.prototype; valueOf = prototype.valueOf; call = valueOf.call; Reflect = global.Reflect; construct = Reflect.construct; Boolean = global.Boolean; closure = function() { }; value = Reflect.apply(construct, Reflect, [Boolean, [], closure]); value = Reflect.apply(call, valueOf, [value]); var result = !value; } catch (error) { } return (_isNativeReflectConstruct_83808_isNativeReflectConstruct = function() { return !!result; })(); } function ConnectedInAppNotificationSettingsScreen({channel}) { // fn#83811, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:2345, offset: 0x01f29907, size: 96 bytes, params: 2, frame: 17 return ((Component) => )(env0_18); } function getScreens_83813(a0, a1) { // fn#83813, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:2551, offset: 0x01f299ba, size: 104 bytes, params: 3, frame: 14 const env0_0 = ChannelStore.getChannel(a0); const object = {headerTitle: headerTitle_83814}; object.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(a1); object.render = render_83815; return {IN_APP_NOTIFICATION_SETTINGS: object}; } function _fun83816(a0) { // fn#83816, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:503, offset: 0x01f29ae7, size: 153 bytes, params: 2, frame: 16 const closure = InAppNotificationSettingsScreen; env0_7(closure, a0); return env0_4(closure, [{key: 'renderGroupDMNotificationSettings', value: value_83820}, {key: 'renderTextChannelNotificationSettings', value: value_83821}, {key: 'renderChannelNotificationSettings', value: function() { var property = this.props.channel; if (property != null) { property = property.type; if (ChannelTypes.GROUP_DM === property) { return this.renderGroupDMNotificationSettings(); } if (ChannelTypes.GUILD_TEXT === property) { return this.renderTextChannelNotificationSettings(); } if (ChannelTypes.GUILD_ANNOUNCEMENT === property) { return this.renderTextChannelNotificationSettings(); } } return null; }}, {key: 'render', value: value_83823}]); } function _fun83824({channelId, onClose}) { // fn#83824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:2952, offset: 0x01f29fcc, size: 119 bytes, params: 2, frame: 16 const value2 = env0_8.useMemo(function() { return getScreens_83813(channelId, onClose); }, [channelId, onClose]); const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator; return ; } function _fun83812() { // fn#83812, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:2447, offset: 0x01f29967, size: 83 bytes, params: 1, frame: 15 var r0; var value3; var isChannelMuted; var value; let channelBinding = channel; const value2 = undefined; if (channelBinding != null) { value3 = environment.__proto__; if (isMultiUserDM(channel.type)) { isChannelMuted = UserGuildSettingsStore.isChannelMuted; channelBinding = channel; value = channelBinding.getGuildId(); value = Reflect.apply(isChannelMuted, UserGuildSettingsStore, [value, channelBinding.id]); r0 = value; } else { r0 = value2; } } else { r0 = value2; } return r0; } function getScreens_83813HeaderTitle() { // fn#83814, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:2647, owner: getScreens_83813.headerTitle, offset: 0x01f29a22, size: 163 bytes, params: 1, frame: 22 var r4; var moduleValue; const binding = env0_0; const value = environment.__proto__; const NavigatorHeader = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).NavigatorHeader; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; const string = intl.string; const h850Ss = (require(1244) /* metro dependency 1244: indexNative */).t.h850Ss; const value2 = null; if (value2 != binding) { moduleValue = require(4805) /* metro dependency 4805: useChannelName */; r4 = moduleValue.computeChannelName(binding, UserStore, RelationshipStore, true); } else { r4 = value2; } return ; } function getScreens_83813Render() { // fn#83815, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:2876, owner: getScreens_83813.render, offset: 0x01f29ac5, size: 34 bytes, params: 1, frame: 13 return ; } function InAppNotificationSettingsScreen(a0) { // fn#83817, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:515, offset: 0x01f29b80, size: 158 bytes, params: 2, frame: 20 var r0; var Reflect; let value = copyRestArgs(0, undefined); let binding = env1_3; binding(this, InAppNotificationSettingsScreen); const items2 = []; arraySpread(items2, value, 0, items2); value = env1_6(InAppNotificationSettingsScreen); binding = env1_5; if (_isNativeReflectConstruct_83808()) { Reflect = global.Reflect; value = Reflect.construct(value, items2, env1_6(this).constructor); r0 = value; } else { value = value.apply(this, items2); r0 = value; } value = binding(this, r0); value.handleGroupDMMute = handleGroupDMMute; value.handleOpenUserSettings = function() { require(dependencyMap[15]).openUserSettings({screen: UserSettingsSections.NOTIFICATIONS}); }; return value; } function value_83820() { // fn#83820, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:1186, offset: 0x01f29cdf, size: 214 bytes, params: 1, frame: 26 const {channel, isMuted} = this.props; if (channel == null) { return null; } const useChannelNameModule = require(4805) /* metro dependency 4805: useChannelName */; const channelName = useChannelNameModule.computeChannelName(channel, UserStore, RelationshipStore); const FormSection = (require(7972) /* metro dependency 7972: native */).FormSection; const FormSwitchRow = (require(7972) /* metro dependency 7972: native */).FormSwitchRow; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; return ( ); } function value_83821() { // fn#83821, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:1528, offset: 0x01f29db5, size: 70 bytes, params: 1, frame: 15 var r0; const channel = this.props.channel; let value = null; if (value == channel) { r0 = value; } else { value = environment.__proto__; value = importDefault(10935) /* metro dependency 10935: ChannelSettingsNotifications */; value = ((Component) => )(value); r0 = value; } return r0; } function value_83823() { // fn#83823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:1939, offset: 0x01f29e60, size: 364 bytes, params: 1, frame: 29 const Form = (require(7972) /* metro dependency 7972: native */).Form; const items2 = [this.renderChannelNotificationSettings()]; const FormSection = (require(7972) /* metro dependency 7972: native */).FormSection; const object = {}; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; let string = intl.string; object.title = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.clE4PU]); const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow; string = intl.string; const cHMaba = (require(1244) /* metro dependency 1244: indexNative */).t.cHMaba; const handleOpenUserSettings = this.handleOpenUserSettings; const FormRow2 = (require(7972) /* metro dependency 7972: native */).FormRow; const Arrow = FormRow2.Arrow; items2[1] = } />; const FormHint = (require(7972) /* metro dependency 7972: native */).FormHint; items2[2] = {intl.string((require(1244) /* metro dependency 1244: indexNative */).t.avgbp1)}; return (
{items2}
); } function handleGroupDMMute() { // fn#83818, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11120:814, owner: InAppNotificationSettingsScreen.handleGroupDMMute, offset: 0x01f29c1e, size: 138 bytes, params: 1, frame: 21 var defaultImport; var updateChannelOverrideSettings; var guildId; var id; var object2; var value3; var NotificationLabel; const props = env0_0.props; const channel = props.channel; if (channel != null) { value = environment.__proto__.__proto__; defaultImport = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */; updateChannelOverrideSettings = defaultImport.updateChannelOverrideSettings; guildId = channel.getGuildId(); id = channel.id; object2 = {}; value3 = !props.isMuted; object2.muted = value3; NotificationLabel = (require(6610) /* metro dependency 6610: NotificationSettingsUtils */).NotificationLabel; Reflect.apply(updateChannelOverrideSettings, defaultImport, [guildId, id, object2, NotificationLabel.muted(value3)]); } }