/* Metro module 11984; source: modules/spoiler_channels/native/ChannelSpoiler.tsx; dependencies: [57, 31, 27, 4606, 1379, 1867, 11793, 33, 4501, 697, 566, 4805, 11794, 7712, 6593, 4008, 6647, 4573, 1244, 4572, 6622, 5278, 11983, 5074, 2] */ function _fun91983(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91983, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12170:6, offset: 0x02078e4e, size: 387 bytes, params: 8, frame: 21 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importDefault(57) /* metro dependency 57 */; const env0_4 = importAll(31) /* metro dependency 31 */; const env0_5 = (require(27) /* metro dependency 27 */).View; const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */; const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */; const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */; const env0_9 = (require(11793) /* metro dependency 11793: VoicePanelControlsConstants */).VoicePanelControlsModes; let value = require(33) /* metro dependency 33 */; const env0_10 = value.jsx; const env0_11 = value.jsxs; value = require(4501) /* metro dependency 4501: createStyles */; const createStyles = value.createStyles; const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE; const env0_12 = Reflect.apply(createStyles, value, [{subtitle: {'textAlign': 'center', 'lineHeight': 22}, subtitleContainer: {alignItems: 'center'}, divider: {'height': 1, 'width': '100%', 'backgroundColor': null, 'marginVertical': 16, backgroundColor: BORDER_SUBTLE}, subtitleMeasure: {'position': 'absolute', 'opacity': 0, 'left': 0, 'right': 0}}]); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/spoiler_channels/native/ChannelSpoiler.tsx'); exports.default = ChannelSpoiler; } function ChannelSpoiler(a0) { // fn#91984, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12170:498, offset: 0x02078fd1, size: 1408 bytes, params: 2, frame: 41 var object2; var r7; var id; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; const Text = (require(4573) /* metro dependency 4573: Text */).Text; var Stack; var defaultImport; var parseTopic; var items2; var defaultImport2; const env0_0 = a0; const value2 = undefined; const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun91985); const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun91986); const styles = useStyles(); let binding = env0_4; const [property, env0_1] = env0_3(binding.useState(false), 2); const value5 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel); const value6 = null; const r0 = value6 == channel ? value2 : channel.isVocal(); binding = env0_4; const useContext = binding.useContext; const value7 = binding.useCallback(_fun91987, [a0.guildId, a0.channelId, Reflect.apply(useContext, binding, [importDefault(11794) /* metro dependency 11794: VoicePanelStateContext */]).setControlsMode, r0]); const value8 = binding.useCallback(_fun91988, []); const value9 = binding.useCallback(_fun91989, [a0.channelId]); const r11 = value6 != channel ? (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIconComponent(channel) : value6; const r8 = value6 != r11 ? {((Component) => )(r11)}{value5} : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['q38/ae']); let topic = value6 == channel ? value2 : channel.topic; if (value6 != topic) { topic = channel.topic; if (topic.trim() === '') { r7 = value6; } else { Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack; var stackProps = {spacing: 4, style: styles.subtitleContainer}; var viewBindingProps = {style: styles.subtitleMeasure, pointerEvents: 'none'}; var textProps = {'variant': 'text-md/medium', 'maxFontSizeMultiplier': 2, onTextLayout: value8}; defaultImport = importDefault(6622) /* metro dependency 6622: MarkupUtils */; parseTopic = defaultImport.parseTopic; topic = channel.topic; id = channel.id; items2 = [{Reflect.apply(parseTopic, defaultImport, [topic, true, {channelId: id}])}]; var textProps2 = {'color': 'text-muted', 'variant': 'text-md/medium', 'style': null, 'maxFontSizeMultiplier': 2, 'lineClamp': 3, style: styles.subtitle}; defaultImport2 = importDefault(6622) /* metro dependency 6622: MarkupUtils */; parseTopic = defaultImport2.parseTopic; topic = channel.topic; id = channel.id; items2[1] = {Reflect.apply(parseTopic, defaultImport2, [topic, true, {channelId: id}])}; items2[2] = property ? ((PressableHighlight) => {intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/QvRak'])})((require(5278) /* metro dependency 5278: Pressables */).PressableHighlight) : value6; items2[3] = ; r7 = {items2}; } } else { r7 = value6; } const GatedContent = importDefault(11983) /* metro dependency 11983: GatedContent */; object2 = {}; const NsfwSpaceWarningModalType = (require(5074) /* metro dependency 5074: AgeVerificationAnalyticsUtils */).NsfwSpaceWarningModalType; const SPOILER_CHANNEL = NsfwSpaceWarningModalType.SPOILER_CHANNEL; object2.modalType = SPOILER_CHANNEL; object2.onAgree = onAgree; object2.onDisagree = value7; object2.title = r8; object2.subtitle = r7; object2.description = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['08bm2Z']); const string = intl.string; const KmRwcW = (require(1244) /* metro dependency 1244: indexNative */).t.KmRwcW; object2.agreement = Reflect.apply(string, intl, [KmRwcW]); object2.disagreement = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/g10LC']); object2.guildId = value6 == guild ? value2 : guild.id; object2.channelId = a0.channelId; return ; } function _fun91987() { // fn#91987, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12170:806, offset: 0x02079570, size: 161 bytes, params: 1, frame: 16 var value2; var value3; var defaultImport2; if (env0_2) { value2 = environment.__proto__; if (ChannelRTCStore.getChatOpen(env0_0.channelId)) { defaultImport2 = importDefault(7712) /* metro dependency 7712: ChannelRTCActionCreators */; defaultImport2.updateChatOpen(env0_0.channelId, false); setControlsMode({mode: VoicePanelControlsModes.FLOATING_DEFAULT}); return undefined; } value3 = environment.__proto__; } const defaultImport = importDefault(6593) /* metro dependency 6593: GuildActionCreators */; defaultImport.nsfwReturnToSafety(env0_0.guildId); } function _fun91988({nativeEvent}) { // fn#91988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12170:1012, offset: 0x02079611, size: 43 bytes, params: 2, frame: 11 env0_1(nativeEvent.lines.length > 3); } function _fun91989() { // fn#91989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12170:1071, offset: 0x0207963c, size: 86 bytes, params: 1, frame: 14 let value = environment.__proto__; value = require(4008) /* metro dependency 4008: RootNavigationRefNative */; value = value.getRootNavigationRef(); if (value != null) { value.navigate('sidebar', {channelId: env0_0.channelId, expandTopic: true}); } } function ChannelSpoilerOnAgree() { // fn#91990, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12170:2424, owner: ChannelSpoiler.onAgree, offset: 0x02079692, size: 50 bytes, params: 1, frame: 12 let value = environment.__proto__; value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */; value.spoilerAgree(env0_0.channelId); }