/* Metro module 14862; source: modules/icymi/native/ICYMICardInteractionRow.tsx; dependencies: [57, 31, 27, 6898, 1379, 4798, 3784, 661, 1881, 33, 3795, 7151, 4501, 697, 477, 4000, 566, 4603, 7067, 8529, 5278, 1244, 7950, 4573, 9841, 673, 1423, 9835, 8852, 11252, 9600, 11209, 14854, 6682, 7152, 11419, 9797, 9580, 9591, 11004, 3860, 4589, 674, 6818, 2] */ function _fun112372(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112372, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:6, offset: 0x023c81df, size: 479 bytes, params: 8, frame: 21 const env0_0 = require; const closure = onAddReaction; const closure2 = useThread; 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 */; let value = require(27) /* metro dependency 27 */; const env0_5 = value.View; const env0_6 = value.Image; const env0_7 = value.ScrollView; const threadMessageStore = importDefault(6898) /* metro dependency 6898: ThreadMessageStore */; const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */; const guildVerificationStore = importDefault(4798) /* metro dependency 4798: GuildVerificationStore */; const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */; value = require(661) /* metro dependency 661: Constants */; const env0_12 = value.MessageFlags; const env0_13 = value.Permissions; const env0_14 = value.HorizontalGradient; const env0_15 = (require(1881) /* metro dependency 1881: EmojiConstants */).EmojiIntention; value = require(33) /* metro dependency 33 */; const env0_16 = value.jsx; const env0_17 = value.jsxs; const env0_18 = value.Fragment; const env0_20 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun112388); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/ICYMICardInteractionRow.tsx'); exports.default = ICYMICardInteractionRow; exports.onAddReaction = closure; exports.useThread = closure2; } function onAddReaction(a0, a1, a2, a3) { // fn#112373, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:336, offset: 0x023c83be, size: 114 bytes, params: 5, frame: 19 var value; var moduleValue; if (a2 != null) { value = require(3795) /* metro dependency 3795: ReactionUtils */; value = value.toReactionEmoji(a2); moduleValue = require(7151) /* metro dependency 7151: ReactionActionCreators */; moduleValue.addReaction(a0, a1, value, (require(7151) /* metro dependency 7151: ReactionActionCreators */).ReactionLocations.MESSAGE, {burst: a3}); } } function useThread(a0, a1, a2) { // fn#112374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:2212, offset: 0x023c8430, size: 180 bytes, params: 4, frame: 20 const env0_0 = a0; const env0_1 = a1; const env0_2 = a2; const value2 = undefined; const {thread, messageCount, mostRecentMessage} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelStore, ThreadMessageStore], _fun112375); env0_4.useEffect(_fun112376, [a0 == null ? value2 : a0.id, a2, a1, a0]); return {thread: thread, messageCount: messageCount, mostRecentMessage: mostRecentMessage}; } function AddEmojiButton({channel, onPressEmoji, showText, disabled, handleItemInteracted}) { // fn#112377, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:2842, offset: 0x023c8652, size: 409 bytes, params: 2, frame: 23 const styles = useStyles(); const value2 = env0_4.useCallback(_fun112378, [channel, onPressEmoji, handleItemInteracted]); const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity; const pressableOpacityProps = {onPress: value2, style: [styles.emojiContainer, styles.addEmojiContainer, disabled ? styles.disabled : null], accessible: true}; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; pressableOpacityProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.lfIHs4); pressableOpacityProps.disabled = disabled; const ReactionIcon = (require(7950) /* metro dependency 7950: ReactionIcon */).ReactionIcon; return ( {showText && ((Text) => {intl.string((require(1244) /* metro dependency 1244: indexNative */).t.m9O1gd)})((require(4573) /* metro dependency 4573: Text */).Text)} ); } function EmojiReaction({messageId, channel, reaction, count, isBurstReaction, handleItemInteracted}) { // fn#112379, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:3667, offset: 0x023c8879, size: 975 bytes, params: 2, frame: 32 var r1; var moduleValue2; const env0_4 = handleItemInteracted; const styles = useStyles(); const value4 = (require(9841) /* metro dependency 9841: useEmojiColorPalette */).useEmojiColorPalette(reaction.burst_colors ?? []); const object2 = {}; const value5 = ''; if (value4 != null) { moduleValue2 = require(673) /* metro dependency 673: ColorUtils */; r1 = moduleValue2.hex2rgb(value4?.backgroundColor, value4?.opacity ?? 0.15) ?? value5; } else { r1 = value5; } object2.backgroundColor = r1; object2.borderColor = value4?.backgroundColor; const r12 = value4?.accentColor != null ? {color: value4.accentColor} : null; const emoji = reaction.emoji; let r10 = isBurstReaction ? reaction.me_burst : reaction.me; const selected = r10 ? styles.selected : undefined; const value8 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildVerificationStore], _fun112380); const value9 = env0_4.useMemo(_fun112381, [emoji]); const value10 = env0_4.useCallback(function() { handleItemInteracted('press_reaction', {'actionGestureType': 'press', 'actionTargetElement': 'toggle_existing_reaction_button', 'actionIntentType': 'react', 'actionDestinationType': null}); require(dependencyMap[27]).handleAddOrRemoveReaction(messageId, channel, reaction, isBurstReaction, require(dependencyMap[11]).ReactionLocations.MESSAGE); }, [channel, isBurstReaction, messageId, reaction, handleItemInteracted]); const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity; const pressableOpacityProps = {style: [styles.emojiContainer, selected, isBurstReaction && object2], onPress: value10, accessible: true, accessibilityLabel: emoji.name, disabled: !value8}; const view = {emoji.id == null ? ((Text) => {emoji.name})((require(4573) /* metro dependency 4573: Text */).Text) : (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? : ((Component) => )(importDefault(8852) /* metro dependency 8852: ActivityEmoji */)}; r10 = r10 && styles.selectedInnerTextContainer; return ( {view} {((Component) => )(importDefault(11252) /* metro dependency 11252: AnimatedCounter */)} ); } function ForwardButton({onPress, disabled}) { // fn#112383, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:5293, offset: 0x023c8d59, size: 223 bytes, params: 2, frame: 19 const styles = useStyles(); const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity; const items2 = [styles.emojiContainer]; items2[1] = styles.addEmojiContainer; items2[2] = disabled ? styles.disabled : null; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; return ( {((Component) => )(importDefault(9600) /* metro dependency 9600: ForwardingIcon */)} ); } function ReplyButton({onPress, disabled}) { // fn#112384, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:5578, offset: 0x023c8e38, size: 225 bytes, params: 2, frame: 19 const styles = useStyles(); const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity; const pressableOpacityProps = {onPress: onPress, style: [styles.emojiContainer, styles.addEmojiContainer, disabled ? styles.disabled : null], accessible: true, disabled: disabled}; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; pressableOpacityProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5NwaNY']); const ArrowAngleLeftUpIcon = (require(11209) /* metro dependency 11209: ArrowAngleLeftUpIcon */).ArrowAngleLeftUpIcon; return ( ); } function ThreadAsCommentsButton({parentMessage, threadData, style, handleItemInteracted}) { // fn#112385, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:5885, offset: 0x023c8f19, size: 562 bytes, params: 2, frame: 25 var messageCount; const styles = useStyles(); const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], function() { var VIEW_CHANNEL = Permissions.VIEW_CHANNEL; return PermissionStore.canWithPartialContext(VIEW_CHANNEL, {channelId: parentMessage.id}); }); const value3 = env0_4.useCallback(_fun112387, [parentMessage, threadData.thread, handleItemInteracted]); if (value2) { messageCount = threadData.messageCount; if (messageCount === 0) { return null; } if (threadData.thread == null) { const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight; return ( {((ChatIcon) => )((require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon)} ); } if (threadData.mostRecentMessage != null) { messageCount = threadData.messageCount; messageCount = messageCount > 9 ? '9+' : threadData.messageCount; const PressableHighlight2 = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight; return ( {((ChatIcon) => )((require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon)} {((Text) => {messageCount})((require(4573) /* metro dependency 4573: Text */).Text)} ); } const PressableHighlight3 = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight; return ( {((ChatIcon) => )((require(6682) /* metro dependency 6682: ChatIcon */).ChatIcon)} ); } return null; } function _fun112388() { // fn#112388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:517, offset: 0x023c9205, size: 674 bytes, params: 1, frame: 19 const object3 = {container: {'flexDirection': 'row', 'alignItems': 'center', 'flexWrap': 'wrap', 'justifyContent': 'space-between'}, replyForwardButtonContainer: {'flexDirection': 'row', 'alignItems': 'center', 'flexWrap': 'wrap', 'gap': 6}, emojisRowContainer: {'position': 'relative', 'flexDirection': 'row', 'alignItems': 'center', 'flexWrap': 'wrap', 'gap': 6}, emojisContainer: {'position': 'relative', 'flexDirection': 'row', 'alignItems': 'center', 'flexWrap': 'wrap', 'gap': 6}}; const object4 = {'flexDirection': 'row', 'backgroundColor': null, 'borderRadius': null, 'flexShrink': 3, 'paddingHorizontal': 8, 'gap': 6}; let REDESIGN_BUTTON_TERTIARY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND; object4.backgroundColor = REDESIGN_BUTTON_TERTIARY_BACKGROUND; object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm; object3.emojiContainer = object4; object3.innerEmojiContainer = {paddingVertical: 5}; object3.selectedInnerEmojiContainer = {paddingVertical: 4}; object3.addEmojiContainer = {'minHeight': 30, 'alignItems': 'center'}; object3.disabled = {opacity: 0.4}; object3.defaultEmoji = {width: env0_19, height: env0_19}; const object5 = {'lineHeight': null, 'fontSize': 16, 'textAlign': 'center', 'paddingTop': 2}; object5.lineHeight = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() ? 16 : env0_19; object3.emojiText = object5; object3.selectedInnerTextContainer = {paddingBottom: 3.5}; object3.innerTextContainer = {'alignSelf': 'flex-end', 'paddingBottom': 4.5}; object3.emojiImage = {resizeMode: 'contain', width: env0_19, height: env0_19}; const object6 = {'borderColor': null, 'borderWidth': 1, 'paddingHorizontal': 7}; const BRAND_560 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_560; object6.borderColor = BRAND_560; const value = require(4000) /* metro dependency 4000: ColorUtils */; const hexWithOpacity = value.hexWithOpacity; const BRAND_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_500; object6.backgroundColor = Reflect.apply(hexWithOpacity, value, [BRAND_500, 0.3]); object3.selected = object6; object3.gradient = {'position': 'absolute', 'right': 0, 'top': 0, 'bottom': 0, 'width': 48}; object3.overflowChevron = {'position': 'absolute', 'right': 0}; const object8 = {'paddingVertical': 6, 'paddingHorizontal': 8, 'backgroundColor': null, 'borderRadius': null, 'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'gap': 8}; REDESIGN_BUTTON_TERTIARY_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND; object8.backgroundColor = REDESIGN_BUTTON_TERTIARY_BACKGROUND; object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm; object3.comments = object8; object3.commentCount = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'gap': 4, 'justifySelf': 'end'}; const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT; object3.commentsIcon = {'width': 20, 'height': 20, tintColor: INTERACTIVE_TEXT_DEFAULT}; return object3; } function ICYMICardInteractionRow({message, channel, guild, hideAdditionalButtons, isKeyMessage, inForum, backgroundVariant, id, itemType}) { // fn#112389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:6994, offset: 0x023c94a7, size: 1429 bytes, params: 2, frame: 54 var r20; var r8; var r0; var items2; var items4; var value25; var items5; hideAdditionalButtons = !(hideAdditionalButtons === undefined) && hideAdditionalButtons; isKeyMessage = !(isKeyMessage === undefined) && isKeyMessage; const env0_3 = isKeyMessage; inForum = !(inForum === undefined) && inForum; backgroundVariant = backgroundVariant === undefined ? 'primary' : backgroundVariant; const env0_4 = backgroundVariant; const styles = useStyles(); const value2 = useThread(guild, message, inForum); let binding = env0_4; let useMemo = binding.useMemo; const value3 = Reflect.apply(useMemo, binding, [function() { message.reactions.forEach(_fun112391); return []; }, [message.reactions]]); const value4 = env0_4.useMemo(_fun112392, [channel]); const value5 = (require(9797) /* metro dependency 9797: canForwardMessage */).useCanForwardMessage(message); const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], function() { var SEND_MESSAGES = Permissions.SEND_MESSAGES; return PermissionStore.can(SEND_MESSAGES, channel); }); const {hasOverflow, showReplyForwardButtons, showThreadAsComments} = env0_4.useMemo(_fun112394, [hideAdditionalButtons, value2.messageCount, value3.length, value6, value5]); const value8 = env0_4.useCallback(_fun112395, [id, itemType]); const value9 = env0_4.useCallback(_fun112396, [channel.id, message.id, value8]); const value10 = env0_4.useCallback(_fun112397, [message, value8]); const value11 = env0_4.useCallback(_fun112398, [channel, message, value8]); binding = env0_4; useMemo = binding.useMemo; const value13 = (require(3860) /* metro dependency 3860: useToken */).useToken(Reflect.apply(useMemo, binding, [_fun112399, [backgroundVariant, isKeyMessage]])); const [property, env0_12] = env0_3(env0_4.useState(true), 2); const value16 = env0_4.useCallback(_fun112400, []); const value17 = env0_4.useCallback(_fun112401, [value8]); if (value3.length !== 0) { var viewBindingProps = {style: styles.container}; var viewBinding2Props = {style: styles.emojisRowContainer}; if (value3.length > 0) { var viewBinding3Props = {style: [styles.emojisContainer]}; var scrollViewBindingProps = {horizontal: true, scrollEnabled: hasOverflow, contentContainerStyle: {gap: 6}, onScroll: value16, onScrollEndDrag: value17, showsHorizontalScrollIndicator: false}; r20 = !hideAdditionalButtons && (showReplyForwardButtons || showThreadAsComments); if (r20) { var viewBinding4Props = {style: styles.replyForwardButtonContainer}; items2 = [showThreadAsComments && ]; items2[1] = showReplyForwardButtons && <>; r20 = {items2}; } items4 = [r20]; items4[1] = value3.map(_fun112402); value25 = null; r20 = hideAdditionalButtons ? value25 : value4 ? : value25; items4[2] = r20; items5 = [{items4}]; items5[1] = hasOverflow && property ? <>{((Component) => )(importDefault(4589) /* metro dependency 4589 */)}{((ChevronSmallRightIcon) => )((require(6818) /* metro dependency 6818: ChevronSmallRightIcon */).ChevronSmallRightIcon)} : value25; r8 = {items5}; } else if (value4) { var viewBinding3Props = {style: [styles.emojisContainer]}; var scrollViewBindingProps = {horizontal: true, scrollEnabled: hasOverflow, contentContainerStyle: {gap: 6}, onScroll: value16, onScrollEndDrag: value17, showsHorizontalScrollIndicator: false}; r20 = !hideAdditionalButtons && (showReplyForwardButtons || showThreadAsComments); if (r20) { var viewBinding4Props = {style: styles.replyForwardButtonContainer}; items2 = [showThreadAsComments && ]; items2[1] = showReplyForwardButtons && <>; r20 = {items2}; } items4 = [r20]; items4[1] = value3.map(_fun112402); value25 = null; r20 = hideAdditionalButtons ? value25 : value4 ? : value25; items4[2] = r20; items5 = [{items4}]; items5[1] = hasOverflow && property ? <>{((Component) => )(importDefault(4589) /* metro dependency 4589 */)}{((ChevronSmallRightIcon) => )((require(6818) /* metro dependency 6818: ChevronSmallRightIcon */).ChevronSmallRightIcon)} : value25; r8 = {items5}; } else { r8 = null; } r0 = {r8}; } else if (hideAdditionalButtons) { r0 = null; } else { var viewBindingProps = {style: styles.container}; var viewBinding2Props = {style: styles.emojisRowContainer}; if (value3.length > 0) { var viewBinding3Props = {style: [styles.emojisContainer]}; var scrollViewBindingProps = {horizontal: true, scrollEnabled: hasOverflow, contentContainerStyle: {gap: 6}, onScroll: value16, onScrollEndDrag: value17, showsHorizontalScrollIndicator: false}; r20 = !hideAdditionalButtons && (showReplyForwardButtons || showThreadAsComments); if (r20) { var viewBinding4Props = {style: styles.replyForwardButtonContainer}; items2 = [showThreadAsComments && ]; items2[1] = showReplyForwardButtons && <>; r20 = {items2}; } items4 = [r20]; items4[1] = value3.map(_fun112402); value25 = null; r20 = hideAdditionalButtons ? value25 : value4 ? : value25; items4[2] = r20; items5 = [{items4}]; items5[1] = hasOverflow && property ? <>{((Component) => )(importDefault(4589) /* metro dependency 4589 */)}{((ChevronSmallRightIcon) => )((require(6818) /* metro dependency 6818: ChevronSmallRightIcon */).ChevronSmallRightIcon)} : value25; r8 = {items5}; } else if (value4) { var viewBinding3Props = {style: [styles.emojisContainer]}; var scrollViewBindingProps = {horizontal: true, scrollEnabled: hasOverflow, contentContainerStyle: {gap: 6}, onScroll: value16, onScrollEndDrag: value17, showsHorizontalScrollIndicator: false}; r20 = !hideAdditionalButtons && (showReplyForwardButtons || showThreadAsComments); if (r20) { var viewBinding4Props = {style: styles.replyForwardButtonContainer}; items2 = [showThreadAsComments && ]; items2[1] = showReplyForwardButtons && <>; r20 = {items2}; } items4 = [r20]; items4[1] = value3.map(_fun112402); value25 = null; r20 = hideAdditionalButtons ? value25 : value4 ? : value25; items4[2] = r20; items5 = [{items4}]; items5[1] = hasOverflow && property ? <>{((Component) => )(importDefault(4589) /* metro dependency 4589 */)}{((ChevronSmallRightIcon) => )((require(6818) /* metro dependency 6818: ChevronSmallRightIcon */).ChevronSmallRightIcon)} : value25; r8 = {items5}; } else { r8 = null; } r0 = {r8}; } return r0; } function _fun112375() { // fn#112375, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:2285, offset: 0x023c84e4, size: 157 bytes, params: 1, frame: 15 var r0; var object2; var value3; var getChannel; var id; var value4; var getCount; var value5; var getMostRecentMessage; const value2 = null; if (value2 == require) { r0 = {'thread': null, 'messageCount': 0, 'mostRecentMessage': null}; } else if (value2 == env0_0) { r0 = {'thread': null, 'messageCount': 0, 'mostRecentMessage': null}; } else { object2 = {}; value3 = environment.__proto__; getChannel = ChannelStore.getChannel; id = require.id; value4 = Reflect.apply(getChannel, ChannelStore, [id]); object2.thread = value2 != value4 ? value4 : value2; getCount = ThreadMessageStore.getCount; id = require.id; value5 = Reflect.apply(getCount, ThreadMessageStore, [id]); object2.messageCount = value2 != value5 ? value5 : 0; getMostRecentMessage = ThreadMessageStore.getMostRecentMessage; id = require.id; object2.mostRecentMessage = Reflect.apply(getMostRecentMessage, ThreadMessageStore, [id]); r0 = object2; } return r0; } function _fun112376() { // fn#112376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:2583, offset: 0x023c8581, size: 209 bytes, params: 1, frame: 17 var id; var value7; var defaultImport; var preload; var fetchMessages; var value; if (require != null && env0_0 != null && (require.hasFlag(MessageFlags.HAS_THREAD) || importDefault) && ThreadMessageStore.getMostRecentMessage(require.id) == null) { value7 = environment.__proto__; defaultImport = importDefault(4603) /* metro dependency 4603: ChannelActionCreators */; preload = defaultImport.preload; id = env0_0.id; Reflect.apply(preload, defaultImport, [id, require.id]); value = importDefault(7067) /* metro dependency 7067: MessageActionCreators */; fetchMessages = value.fetchMessages; id = require.id; Reflect.apply(fetchMessages, value, [{'channelId': null, 'isPreload': true, 'limit': 25, channelId: id}]); } } function _fun112378() { // fn#112378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:2966, offset: 0x023c87eb, size: 142 bytes, params: 1, frame: 17 const handleItemInteractedBinding = handleItemInteracted; const value2 = undefined; handleItemInteractedBinding('press_reaction_picker', {'actionGestureType': 'press', 'actionTargetElement': 'reaction_picker_button', 'actionIntentType': 'open', 'actionDestinationType': null}); const openEmojiPickerActionSheetModule = require(8529) /* metro dependency 8529: openEmojiPickerActionSheet */; const openEmojiPickerActionSheet = openEmojiPickerActionSheetModule.openEmojiPickerActionSheet; const REACTION = EmojiIntention.REACTION; const channelBinding = channel; Reflect.apply(openEmojiPickerActionSheet, openEmojiPickerActionSheetModule, [{'pickerIntention': null, 'autoFocus': false, 'startExpanded': false, pickerIntention: REACTION, onPressEmoji: onPressEmoji, channel: channelBinding, guildId: channelBinding == null ? value2 : channel.guild_id}]); return value2; } function _fun112380() { // fn#112380, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:4188, offset: 0x023c8c48, size: 50 bytes, params: 1, frame: 12 return channel.guild_id != null && GuildVerificationStore.canChatInGuild(channel.guild_id); } function _fun112381() { // fn#112381, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:4254, offset: 0x023c8c7a, size: 107 bytes, params: 1, frame: 15 var r0; var value3; var defaultImport; if (emoji.id != null) { value3 = environment.__proto__; defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */; r0 = {uri: defaultImport.getEmojiURL({id: emoji.id, animated: emoji.animated, size: 48})}; } else { r0 = undefined; } return r0; } function _fun112387() { // fn#112387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:6105, offset: 0x023c917c, size: 137 bytes, params: 1, frame: 16 var value4; var moduleValue; var navigateToPost; handleItemInteracted('press_comments', {'actionGestureType': 'press', 'actionTargetElement': 'thread_comments_button', 'actionIntentType': 'navigate', 'actionDestinationType': 'channel'}); if (parentMessage != null && threadData.thread != null) { value4 = environment.__proto__; moduleValue = require(14854) /* metro dependency 14854: ICYMIShared */; navigateToPost = moduleValue.navigateToPost; parentMessageBinding = parentMessage; Reflect.apply(navigateToPost, moduleValue, [parentMessageBinding.getChannelId(), threadData.thread.guild_id, parentMessageBinding.id]); } } function _fun112390() { // fn#112390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:7204, offset: 0x023c9a3c, size: 42 bytes, params: 1, frame: 12 message.reactions.forEach(_fun112391); return []; } function _fun112392() { // fn#112392, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:7431, offset: 0x023c9b27, size: 52 bytes, params: 1, frame: 13 return channel != null && (importDefault(11419) /* metro dependency 11419: canAddNewReactions */)(channel); } function _fun112394() { // fn#112394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:7576, offset: 0x023c9b81, size: 134 bytes, params: 1, frame: 6 const r2 = hideAdditionalButtons ? 6 : 4; const messageCount = env0_7.messageCount; const value4 = 0; const r1 = messageCount > value4 ? r2 - 1 : r2; return {hasOverflow: (env0_8.length > r1 ? env0_8.length - r1 : value4) > value4, showReplyForwardButtons: !hideAdditionalButtons && (env0_10 || env0_9), showThreadAsComments: env0_7.messageCount > value4}; } function _fun112395(a0, a1) { // fn#112395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:7870, offset: 0x023c9c07, size: 94 bytes, params: 3, frame: 19 let value = environment.__proto__; value = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */; const itemInteracted = value.itemInteracted; const idBinding = id; const itemTypeBinding = itemType; Reflect.apply(itemInteracted, value, [idBinding, itemTypeBinding, a0]); value = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */; value.feedItemActioned({itemId: idBinding, itemType: itemTypeBinding, actionParameters: a1}); } function _fun112396(a0, a1) { // fn#112396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:8003, offset: 0x023c9c65, size: 74 bytes, params: 3, frame: 17 env0_11('press_reaction', {'actionGestureType': 'press', 'actionTargetElement': 'add_new_reaction_button', 'actionIntentType': 'open', 'actionDestinationType': null}); onAddReaction(channel.id, message.id, a0, a1); } function _fun112397() { // fn#112397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:8219, offset: 0x023c9caf, size: 91 bytes, params: 1, frame: 14 env0_11('press_forward', {'actionGestureType': 'press', 'actionTargetElement': 'forward_button', 'actionIntentType': 'share', 'actionDestinationType': 'channel'}); (require(9591) /* metro dependency 9591: ForwardModalUtils */).openForwardModal({message: message, source: 'icymi-tab'}); } function _fun112398() { // fn#112398, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:8449, offset: 0x023c9d0a, size: 141 bytes, params: 1, frame: 20 env0_11('press_reply', {'actionGestureType': 'press', 'actionTargetElement': 'reply_button', 'actionIntentType': 'reply', 'actionDestinationType': 'channel'}); const icymiSharedModule = require(14854) /* metro dependency 14854: ICYMIShared */; const navigateToPost = icymiSharedModule.navigateToPost; const channelBinding = channel; const id = channelBinding.id; const guild_id = channelBinding.guild_id; const messageBinding = message; Reflect.apply(navigateToPost, icymiSharedModule, [id, guild_id, messageBinding.id]); const value = require(11004) /* metro dependency 11004: PendingReplyActionCreators */; value.createPendingReply({channel: channelBinding, message: messageBinding, shouldMention: true, showMentionToggle: true}); } function _fun112399() { // fn#112399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:8750, offset: 0x023c9d97, size: 197 bytes, params: 1, frame: 11 if (isKeyMessage) { value = environment.__proto__; return (importDefault(697) /* metro dependency 697: native */).colors.MESSAGE_HIGHLIGHT_BACKGROUND_DEFAULT; } const backgroundVariantBinding = backgroundVariant; if (backgroundVariantBinding === 'primary') { value = environment.__proto__; return (importDefault(697) /* metro dependency 697: native */).colors.CARD_BACKGROUND_DEFAULT; } if (backgroundVariantBinding === 'secondary') { value = environment.__proto__; return (importDefault(697) /* metro dependency 697: native */).colors.CARD_SECONDARY_BG; } if (backgroundVariantBinding === 'base') { value = environment.__proto__; return (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW; } } function _fun112400({nativeEvent}) { // fn#112400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:9092, offset: 0x023c9e5c, size: 69 bytes, params: 2, frame: 12 env0_12(!(nativeEvent.contentOffset.x + nativeEvent.layoutMeasurement.width >= nativeEvent.contentSize.width)); } function _fun112401() { // fn#112401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:9222, offset: 0x023c9ea1, size: 37 bytes, params: 1, frame: 13 env0_11('scroll_reaction_row', {'actionGestureType': 'swipe', 'actionTargetElement': 'reaction_row_container', 'actionIntentType': 'scroll', 'actionDestinationType': null}); } function _fun112402(a0, a1) { // fn#112402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:9936, offset: 0x023c9ec6, size: 209 bytes, params: 3, frame: 23 const id = message.id; const channelBinding = channel; let type = a0.type; const ReactionTypes = (require(7152) /* metro dependency 7152: MessageReactionsTypes */).ReactionTypes; let BURST = ReactionTypes.BURST; const r9 = type === BURST ? a0.burst_count : a0.count; type = a0.type; BURST = ReactionTypes.BURST; return ( ); } function _fun112391(a0) { // fn#112391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15059:7246, offset: 0x023c9a66, size: 193 bytes, params: 2, frame: 17 var r7; var value; var binding; var push; var object2; const ReactionTypes = (require(7152) /* metro dependency 7152: MessageReactionsTypes */).ReactionTypes; if (a0.me_vote == null) { if (a0.burst_count > 0) { binding = env0_0; push = binding.push; object2 = {}; copyDataProperties(object2, a0, r7); value = environment.__proto__.__proto__; object2['type'] = ReactionTypes.BURST; Reflect.apply(push, binding, [object2]); r7 = require; } if (a0.count > 0) { binding = env0_0; push = binding.push; object2 = {}; copyDataProperties(object2, a0, r7); value = environment.__proto__.__proto__; object2['type'] = ReactionTypes.NORMAL; Reflect.apply(push, binding, [object2]); } } }