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

556 lines
33 KiB
TypeScript

/* Metro module 11002; source: modules/chat_input/native/ChatInputContextBar.tsx; dependencies: [31, 27, 4502, 1878, 661, 33, 1305, 4501, 697, 1357, 4573, 1244, 5278, 8523, 566, 3874, 4635, 8699, 8206, 4020, 11003, 3963, 4017, 4504, 11004, 683, 11005, 1230, 4634, 11206, 2] */
function _fun84199(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:6, offset: 0x01f3e60d, size: 458 bytes, params: 8, frame: 21
var object2;
const env0_0 = require;
const closure = ChatInputReplyBar;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_4 = value2.StyleSheet;
const env0_5 = value2.View;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_8 = constantsModule.AnalyticEvents;
const env0_9 = constantsModule.Routes;
const value4 = require(33) /* metro dependency 33 */;
const env0_10 = value4.jsx;
const env0_11 = value4.jsxs;
const env0_12 = value4.Fragment;
object2 = {duration: 250};
const STANDARD_EASING = (require(1305) /* metro dependency 1305: native */).STANDARD_EASING;
object2.easing = STANDARD_EASING;
const env0_14 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function(a0) {
return {contextBar: {backgroundColor: a0 ?? importDefault(dependencyMap[8]).colors.MOBILE_FLOATING_ACCESSORY_BACKGROUND}};
});
const env0_15 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun84208);
object2 = {code: 'function ChatInputContextBarTsx1(){const{stylesBackgroundColor,chatInputFloating,heightSv}=this.__closure;return{backgroundColor:stylesBackgroundColor,...(chatInputFloating?{maxHeight:heightSv.get()}:{height:heightSv.get()})};}'};
object2 = {code: 'function ChatInputContextBarTsx2(finished){const{runOnJS,handleTransitionFinished}=this.__closure;if(finished){runOnJS(handleTransitionFinished)();}}'};
const env0_18 = value.forwardRef(_fun84209);
value = value.memo(ChatInputContextBar);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/chat_input/native/ChatInputContextBar.tsx');
exports.default = value;
exports.ChatInputReplyBar = closure;
}
function ChatInputReplyBarNoAuthor({onCancelReplying}) { // fn#84200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:1989, offset: 0x01f3e7d7, size: 788 bytes, params: 2, frame: 30
var r0;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var items3;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items2;
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const object2 = {location: 'ChatInputContextBar'};
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
[object2]).chatInputFloating;
const styles = useStyles();
if (chatInputFloating) {
var viewBindingProps = {style: styles.contextBarRow};
string = intl.string;
items2 = [<Text lineClamp={1} variant="text-sm/normal" color="text-strong" style={styles.floatingReplyTextWrapper}>{Reflect.apply(string,
intl, [t['5IEsGx']])}</Text>];
string = intl.string;
items2[1] = <View style={styles.floatingRightActions}><PressableOpacity activeOpacity={0.5} accessibilityRole="button" accessibilityLabel={Reflect.apply(string,
intl,
[t.jSnJGT])} onPress={onCancelReplying}>{((Icon) => <Icon source={importDefault(8523) /* metro dependency 8523 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.CUSTOM} style={styles.floatingCloseIcon} />)((require(1305) /* metro dependency 1305: native */).Icon)}</PressableOpacity></View>;
r0 = <View {...viewBindingProps}>{items2}</View>;
} else {
var pressableOpacityProps = {'activeOpacity': 0.5, 'accessibilityRole': 'button',
accessibilityLabel: intl.string(t.jSnJGT), onPress: onCancelReplying, style: styles.contextBarRow};
items3 = [<View style={styles.contextCancelIconWrapper}>{((Icon) => <Icon source={importDefault(8523) /* metro dependency 8523 */} size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL_20} />)((require(1305) /* metro dependency 1305: native */).Icon)}</View>];
items3[1] = <Text lineClamp={1} variant="text-sm/medium" color="text-default" style={styles.contextButtonText}>{intl.string(t['5IEsGx'])}</Text>;
r0 = <PressableOpacity {...pressableOpacityProps}>{items3}</PressableOpacity>;
}
return r0;
}
function ChatInputReplyBar({pendingReply, pendingReplyAuthor, onTapContextBarReply, onCancelReplying, onToggleReplyMention, chatInputFloatingOverride}) { // fn#84201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:3094, offset: 0x01f3eaeb, size: 1870 bytes, params: 2, frame: 34
var object5;
var r10;
var r17;
var r5;
var r16;
var r14;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var string;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var object2;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
var Sizes;
var items2;
var object4;
var items4;
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const r6 = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
[{location: 'ChatInputContextBar'}]).chatInputFloating || chatInputFloatingOverride;
const styles = useStyles();
const roleStyle = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
function() {
return AccessibilityStore.roleStyle;
});
const useA11yRolesNativeModule = require(3874) /* metro dependency 3874: useA11yRolesNative */;
const useCheckboxA11yNative = useA11yRolesNativeModule.useCheckboxA11yNative;
object5 = {};
let shouldMention = pendingReply.shouldMention;
object5.checked = shouldMention;
const {accessibilityRole, accessibilityState} = Reflect.apply(useCheckboxA11yNative, useA11yRolesNativeModule,
[object5]);
const colorString = pendingReplyAuthor.colorString;
const colorStrings = pendingReplyAuthor.colorStrings;
const env0_3 = colorStrings;
const nick = pendingReplyAuthor.nick;
const guildId = pendingReplyAuthor.guildId;
const env0_6 = env0_3.useMemo(function() {
var roleStyleBinding = roleStyle;
var value2 = undefined;
return roleStyleBinding === 'hidden' ? value2 : colorString != null ? [{color: colorString}] : value2;
}, [colorString, roleStyle]);
const env0_7 = (require(8699) /* metro dependency 8699: useDisplayNameStylesFont */).useDisplayNameStylesFont({displayNameStyles: (importDefault(4635) /* metro dependency 4635: useDisplayNameStyles */)({userId: pendingReply.message.author.id,
guildId: guildId})});
const env0_9 = (require(8206) /* metro dependency 8206: EnhancedRoleColorUtils */).useIsRoleStyleAndRoleColorsEligibleForERC(guildId,
pendingReply.message.author.id, roleStyle,
(require(8206) /* metro dependency 8206: EnhancedRoleColorUtils */).useProcessColorStringsArray(colorStrings));
const closure = function(a0) {
var env0_0 = 'text-sm/semibold';
return require(dependencyMap[11]).intl.format(require(dependencyMap[11]).t['8E4GxS'], {userHook: _fun84205});
};
if (onTapContextBarReply == null) {
object5 = {lineClamp: 1};
r10 = r6 ? 'text-sm/normal' : 'text-sm/medium';
object5.variant = r10;
r10 = r6 ? 'text-strong' : 'text-default';
object5.color = r10;
r5 = <Text {...object5}>{closure('text-sm/semibold')}</Text>;
} else {
var pressableOpacityProps2 = {style: r6 ? styles.floatingReplyTextWrapper : styles.contextButtonText,
accessibilityRole: 'link', accessibilityLabel: intl.formatToPlainString(t.EpJL4E, {username: nick}),
accessibilityHint: intl.string(t['0CfCVW']), activeOpacity: 0.5, onPress: onTapContextBarReply};
object2 = {lineClamp: 1};
r17 = r6 ? 'text-sm/normal' : 'text-sm/medium';
object2.variant = r17;
r17 = r6 ? 'text-strong' : 'text-default';
object2.color = r17;
r5 = <PressableOpacity {...pressableOpacityProps2}><Text {...object2}>{closure('text-sm/semibold')}</Text></PressableOpacity>;
}
if (onCancelReplying != null) {
var pressableOpacityProps = {'accessibilityRole': 'button', 'accessibilityLabel': null, 'activeOpacity': 0.5,
accessibilityLabel: intl.string((require(1244) /* metro dependency 1244: indexNative */).t.jSnJGT),
style: r6 ? undefined : styles.contextCancelIconWrapper, onPress: onCancelReplying};
var iconProps = {source: importDefault(8523) /* metro dependency 8523 */};
Sizes = (require(1305) /* metro dependency 1305: native */).Icon.Sizes;
iconProps.size = r6 ? Sizes.CUSTOM : Sizes.SMALL_20;
iconProps.style = r6 ? styles.floatingCloseIcon : undefined;
r10 = <PressableOpacity {...pressableOpacityProps}><Icon {...iconProps} /></PressableOpacity>;
} else {
r10 = null;
}
if (pendingReply != null) {
if (pendingReply.showMentionToggle) {
var pressableOpacityProps = {accessibilityRole: accessibilityRole, accessibilityState: accessibilityState,
accessibilityLabel: intl.string(t.P8tvKG)};
shouldMention = pendingReply.shouldMention;
string = intl.string;
pressableOpacityProps.accessibilityHint = shouldMention ? Reflect.apply(string, intl,
[t.PBgTSF]) : Reflect.apply(string, intl, [t['+LXBxU']]);
pressableOpacityProps.activeOpacity = 0.5;
pressableOpacityProps.onPress = onToggleReplyMention;
pressableOpacityProps.style = r6 ? styles.floatingMentionGroup : styles.replyMentionButton;
var iconProps = {source: importDefault(11003) /* metro dependency 11003 */,
size: (require(1305) /* metro dependency 1305: native */).Icon.Sizes.CUSTOM};
shouldMention = pendingReply.shouldMention;
r16 = shouldMention && styles.replyMentionIconActive;
iconProps.style = [styles.replyMentionIcon, r16];
items2 = [<Icon {...iconProps} />];
object4 = {};
r16 = r6 ? 'text-sm/semibold' : 'text-sm/bold';
object4.variant = r16;
object4.color = 'text-muted';
shouldMention = pendingReply.shouldMention;
object4.style = shouldMention ? styles.replyMentionButtonActive : undefined;
shouldMention = pendingReply.shouldMention;
string = intl.string;
r16 = shouldMention ? Reflect.apply(string, intl, [t.p9jC2r]) : Reflect.apply(string, intl, [t.U7f3bK]);
items2[1] = <Text {...object4}>{r16}</Text>;
r14 = <PressableOpacity {...pressableOpacityProps}>{items2}</PressableOpacity>;
} else {
r14 = null;
}
} else {
r14 = null;
}
const items3 = [!r6 && r10, r5];
if (r6) {
var viewBinding2Props = {style: styles.floatingRightActions};
items4 = [r14];
items4[1] = pendingReply?.showMentionToggle && <View style={styles.floatingDivider} />;
items4[2] = r10;
r5 = <View {...viewBinding2Props}>{items4}</View>;
} else {
r5 = r14;
}
items3[2] = r5;
return (
<View style={styles.contextBarRow}>
{items3}
</View>
);
}
function ChatInputEditBar({onCancelEditing}) { // fn#84206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:6170, offset: 0x01f3f488, size: 583 bytes, params: 2, frame: 24
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
[{location: 'ChatInputContextBar'}]).chatInputFloating;
const styles = useStyles();
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const textProps = {lineClamp: 1, variant: chatInputFloating ? 'text-sm/normal' : 'text-sm/medium',
color: chatInputFloating ? 'text-strong' : 'text-default',
style: chatInputFloating ? styles.floatingReplyTextWrapper : styles.contextButtonText};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const text = <Text {...textProps}>{Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t.rtNXxN])}</Text>;
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
string = intl.string;
const qv9j1K = (require(1244) /* metro dependency 1244: indexNative */).t.qv9j1K;
const contextCancelIconWrapper = chatInputFloating ? undefined : styles.contextCancelIconWrapper;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
const iconProps = {source: importDefault(8523) /* metro dependency 8523 */};
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
iconProps.size = chatInputFloating ? Sizes.CUSTOM : Sizes.SMALL_20;
iconProps.style = chatInputFloating ? styles.floatingCloseIcon : undefined;
const pressableOpacity = <PressableOpacity accessibilityRole="button" accessibilityLabel={Reflect.apply(string,
intl,
[qv9j1K])} activeOpacity={0.5} style={contextCancelIconWrapper} onPress={onCancelEditing}><Icon {...iconProps} /></PressableOpacity>;
const jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
const object = {};
const items2 = [];
if (chatInputFloating) {
items2[0] = text;
items2[1] = <View style={styles.floatingRightActions}>{pressableOpacity}</View>;
object.children = items2;
} else {
items2[0] = pressableOpacity;
items2[1] = text;
object.children = items2;
}
return (
<View style={styles.contextBarRow}>
{((Fragment) => <Fragment {...object} />)(jsxRuntimeEnv0_12Binding)}
</View>
);
}
function _fun84208() { // fn#84208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:436, offset: 0x01f3f70b, size: 586 bytes, params: 1, frame: 18
const object4 = {};
const object6 = {'overflow': 'hidden', 'flexDirection': 'row', 'alignItems': 'center'};
const CHAT_INPUT_CONTEXT_BAR_PADDING_HORIZONTAL = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_CONTEXT_BAR_PADDING_HORIZONTAL;
object6.paddingHorizontal = CHAT_INPUT_CONTEXT_BAR_PADDING_HORIZONTAL;
const CHAT_INPUT_CONTEXT_BAR_PADDING_VERTICAL = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_CONTEXT_BAR_PADDING_VERTICAL;
object6.paddingVertical = CHAT_INPUT_CONTEXT_BAR_PADDING_VERTICAL;
const CHAT_INPUT_CONTEXT_BAR_GAP = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_CONTEXT_BAR_GAP;
object6.gap = CHAT_INPUT_CONTEXT_BAR_GAP;
object4.contextBarRow = object6;
object4.floatingReplyTextWrapper = {'flexShrink': 1, 'minWidth': 0};
object4.contextCancelIconWrapper = {'paddingHorizontal': 12, 'paddingVertical': 10};
object4.contextButtonText = {'flexGrow': 1, 'flexShrink': 1, 'justifyContent': 'center', 'alignSelf': 'stretch',
'paddingRight': 12, 'paddingVertical': 10};
const object8 = {};
object8.borderBottomWidth = StyleSheet.hairlineWidth;
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
object8.borderBottomColor = BORDER_MUTED;
object8.overflow = 'hidden';
object4.floatingContextBar = object8;
object4.replyMentionButton = {'flexDirection': 'row', 'alignItems': 'center', 'paddingHorizontal': 12,
'paddingVertical': 10};
let CONTROL_BRAND_FOREGROUND = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_BRAND_FOREGROUND;
object4.replyMentionButtonActive = {color: CONTROL_BRAND_FOREGROUND};
const object9 = {};
let CHAT_INPUT_REPLY_MENTION_ICON_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_REPLY_MENTION_ICON_SIZE;
object9.width = CHAT_INPUT_REPLY_MENTION_ICON_SIZE;
CHAT_INPUT_REPLY_MENTION_ICON_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_REPLY_MENTION_ICON_SIZE;
object9.height = CHAT_INPUT_REPLY_MENTION_ICON_SIZE;
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object9.tintColor = TEXT_MUTED;
const CHAT_INPUT_REPLY_MENTION_ICON_MARGIN_RIGHT = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_REPLY_MENTION_ICON_MARGIN_RIGHT;
object9.marginRight = CHAT_INPUT_REPLY_MENTION_ICON_MARGIN_RIGHT;
object4.replyMentionIcon = object9;
CONTROL_BRAND_FOREGROUND = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_BRAND_FOREGROUND;
object4.replyMentionIconActive = {tintColor: CONTROL_BRAND_FOREGROUND};
object4.floatingRightActions = {'flexGrow': 1, 'flexShrink': 0, 'flexDirection': 'row', 'alignItems': 'center',
'justifyContent': 'flex-end', 'gap': 8};
object4.floatingMentionGroup = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 2};
const object10 = {};
object10.width = StyleSheet.hairlineWidth;
object10.alignSelf = 'stretch';
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object10.backgroundColor = BORDER_SUBTLE;
object4.floatingDivider = object10;
const INTERACTIVE_ICON_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_ICON_DEFAULT;
object4.floatingCloseIcon = {'width': 16, 'height': 16, tintColor: INTERACTIVE_ICON_DEFAULT};
return object4;
}
function _fun84209({children}, a1) { // fn#84209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:7414, offset: 0x01f3f955, size: 431 bytes, params: 3, frame: 23
const clientThemesUtilsModule = require(3963) /* metro dependency 3963: ClientThemesUtils */;
const useGradientValue = clientThemesUtilsModule.useGradientValue;
const GradientPercentage = clientThemesUtilsModule.GradientPercentage;
const END = GradientPercentage.END;
const value2 = Reflect.apply(useGradientValue, clientThemesUtilsModule, [END]);
const mobileVisualRefreshExperimentModule = require(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */;
const useMobileVisualRefreshConfig = mobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, mobileVisualRefreshExperimentModule,
[{location: 'ChatInputContextBar'}]).chatInputFloating;
let styles = useStyles(value2);
const backgroundColor = styles.contextBar.backgroundColor;
styles = useStyles();
const env0_2 = chatInputFloating ? 60 : 40;
const value5 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0);
const env0_3 = value5;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
const closure = o_84210;
closure.__closure = {stylesBackgroundColor: backgroundColor, chatInputFloating: chatInputFloating, heightSv: value5};
closure.__workletHash = 3976432455712;
closure.__initData = env0_16;
const value6 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
const env0_5 = env0_3.useCallback(_fun84211, [env0_3.useRef(null)]);
env0_3.useImperativeHandle(a1, function() {
return {componentDidAppear: _fun84213, componentDidEnter: _fun84214, componentWillLeave: _fun84215};
});
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
return (
<View style={[value6, chatInputFloating && styles.floatingContextBar]}>
{children}
</View>
);
}
function ChatInputContextBar({channel, chatInputRef, pendingEdit, pendingReply}) { // fn#84217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:8452, offset: 0x01f3fca5, size: 389 bytes, params: 2, frame: 29
const {onCancelEditing, onCancelReplying, onTapContextBarReply, onToggleReplyMention} = env0_3.useMemo(function() {
return {onCancelEditing: _fun84219, onCancelReplying: _fun84220, onTapContextBarReply: _fun84221,
onToggleReplyMention: _fun84222};
}, [channel, chatInputRef, pendingReply]);
const value4 = (require(4634) /* metro dependency 4634: useMessageAuthor */).useNullableMessageAuthor(pendingReply?.message);
const TransitionGroup = (require(11206) /* metro dependency 11206: TransitionGroup */).TransitionGroup;
return (
<TransitionGroup component={View}>
{pendingReply != null && value4 != null && ((Component) => <Component><ChatInputReplyBar pendingReply={pendingReply} pendingReplyAuthor={value4} onTapContextBarReply={onTapContextBarReply} onCancelReplying={onCancelReplying} onToggleReplyMention={onToggleReplyMention} /></Component>)(env0_18)}
{pendingReply != null && value4 == null && ((Component) => <Component><ChatInputReplyBarNoAuthor onCancelReplying={onCancelReplying} /></Component>)(env0_18)}
{pendingEdit != null && ((Component) => <Component><ChatInputEditBar onCancelEditing={onCancelEditing} /></Component>)(env0_18)}
</TransitionGroup>
);
}
function replyText(a0) { // fn#84204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:3877, owner: ChatInputReplyBar.replyText, offset: 0x01f3f27f, size: 91 bytes, params: 2, frame: 16
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
return intl.format((require(1244) /* metro dependency 1244: indexNative */).t['8E4GxS'], {userHook: userHook_84205});
}
function o_84210() { // fn#84210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:7708, offset: 0x01f3fb04, size: 64 bytes, params: 1, frame: 14
const object3 = {};
object3.backgroundColor = backgroundColor;
const chatInputFloatingBinding = chatInputFloating;
const object4 = {};
const binding = env0_3;
const value = binding.get();
if (chatInputFloatingBinding) {
object4.maxHeight = value;
} else {
object4.height = value;
}
copyDataProperties(object3, object4, binding);
return object3;
}
function _fun84211() { // fn#84211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:7927, offset: 0x01f3fb44, size: 35 bytes, params: 1, frame: 10
if (env0_4.current != null) {
env0_4.current();
}
}
function _fun84212() { // fn#84212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:8000, offset: 0x01f3fb67, size: 42 bytes, params: 1, frame: 3
return {componentDidAppear: componentDidAppear, componentDidEnter: componentDidEnter,
componentWillLeave: componentWillLeave};
}
function _fun84218() { // fn#84218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:8555, offset: 0x01f3fe2a, size: 54 bytes, params: 1, frame: 3
return {onCancelEditing: function() {
var current = chatInputRef.current;
if (current != null) {
current.handleCancelEditing();
}
}, onCancelReplying: onCancelReplying, onTapContextBarReply: onTapContextBarReply,
onToggleReplyMention: onToggleReplyMention_84222};
}
function replyTextUserHook(a0, a1) { // fn#84205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:3932, owner: ChatInputReplyBar.replyText.userHook, offset: 0x01f3f2da, size: 430 bytes, params: 3, frame: 25
var r0;
var value2;
var value3;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var object;
var moduleValue;
var value6;
var jsxRuntimeEnv2_12Binding;
var value7;
var items2;
const value = environment.__proto__;
if (roleStyle !== 'dot') {
value2 = environment.__proto__.__proto__;
value3 = undefined;
var textProps = {variant: env0_0};
moduleValue = require(4020) /* metro dependency 4020: FabricUtils */;
textProps.experimental_useNativeText = !moduleValue.isFabric();
textProps.style = [env1_6, env1_7 != null && ({fontFamily: env1_7})];
r0 = env1_9 ? env1_8 : value3;
textProps.gradientColors = r0;
r0 = <Text {...textProps} key={'' + a1 + '-' + pendingReply.message.author.id}>{nick}</Text>;
} else if (colorString != null) {
value6 = environment.__proto__.__proto__;
jsxRuntimeEnv2_12Binding = jsxRuntimeEnv2_12;
value7 = undefined;
items2 = [((RoleDot) => <RoleDot color={colorString} colors={colorStrings} guildId={guildId} size="small" />)((require(1305) /* metro dependency 1305: native */).RoleDot)];
items2[1] = <Text variant={env0_0} style={env1_7 != null ? {fontFamily: env1_7} : value7} key={a1}>{nick}</Text>;
r0 = <>{items2}</>;
} else {
value2 = environment.__proto__.__proto__;
value3 = undefined;
var textProps = {variant: env0_0};
moduleValue = require(4020) /* metro dependency 4020: FabricUtils */;
textProps.experimental_useNativeText = !moduleValue.isFabric();
textProps.style = [env1_6, env1_7 != null && ({fontFamily: env1_7})];
r0 = env1_9 ? env1_8 : value3;
textProps.gradientColors = r0;
r0 = <Text {...textProps} key={'' + a1 + '-' + pendingReply.message.author.id}>{nick}</Text>;
}
return r0;
}
function componentDidAppear() { // fn#84213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:8006, offset: 0x01f3fb91, size: 63 bytes, params: 1, frame: 16
const binding = env1_3;
const set = binding.set;
const timingModule = require(4504) /* metro dependency 4504: timing */;
Reflect.apply(set, binding, [timingModule.withTiming(env1_2, env2_13)]);
}
function componentWillLeave(a0) { // fn#84215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:8113, offset: 0x01f3fbd0, size: 157 bytes, params: 2, frame: 24
env1_4.current = a0;
const binding = env1_3;
const set = binding.set;
const timingModule = require(4504) /* metro dependency 4504: timing */;
const withTiming = timingModule.withTiming;
const binding2 = env2_13;
const closure = componentWillLeaveN;
const object2 = {};
object2.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object2.handleTransitionFinished = env1_5;
closure.__closure = object2;
closure.__workletHash = 10908592279914;
closure.__initData = env2_17;
Reflect.apply(set, binding, [Reflect.apply(withTiming, timingModule, [0, binding2, 'respect-motion-settings',
closure])]);
}
function onCancelReplying() { // fn#84220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:8651, offset: 0x01f3fe80, size: 277 bytes, params: 1, frame: 21
var id;
var value2;
var value3;
var moduleValue;
var deletePendingReply;
var channelBinding;
var defaultImport;
var track;
var CHAT_CONTEXT_BAR_ACTION_CANCELED;
var object2;
var currentUser;
if (pendingReply != null) {
value2 = environment.__proto__.__proto__;
value3 = undefined;
moduleValue = require(11004) /* metro dependency 11004: PendingReplyActionCreators */;
deletePendingReply = moduleValue.deletePendingReply;
id = channel.id;
Reflect.apply(deletePendingReply, moduleValue, [id]);
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
CHAT_CONTEXT_BAR_ACTION_CANCELED = AnalyticEvents.CHAT_CONTEXT_BAR_ACTION_CANCELED;
object2 = {};
id = pendingReply == null ? value3 : pendingReply.message.id;
object2.message_id = id;
channelBinding = channel;
id = channelBinding.id;
object2.channel_id = id;
object2.guild_id = channelBinding.guild_id;
object2.context_action = 'reply';
object2.reason = (require(11005) /* metro dependency 11005: LongPressMessageActionSheetUtils */).getContextBarCancelReason('reply',
'cancel');
currentUser = UserStore.getCurrentUser();
id = currentUser == null ? value3 : currentUser.id;
object2.is_own_message = id === (pendingReply == null ? value3 : pendingReply.message.author.id);
Reflect.apply(track, defaultImport, [CHAT_CONTEXT_BAR_ACTION_CANCELED, object2]);
}
}
function onTapContextBarReply() { // fn#84221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:9037, offset: 0x01f3ff95, size: 109 bytes, params: 1, frame: 17
var value2;
var moduleValue;
var transitionTo;
var CHANNEL;
var channel;
let value = environment.__proto__;
let pendingReplyBinding = pendingReply;
if (pendingReplyBinding != null) {
value2 = environment.__proto__.__proto__;
moduleValue = require(1230) /* metro dependency 1230: router_utils */;
transitionTo = moduleValue.transitionTo;
CHANNEL = Routes.CHANNEL;
pendingReplyBinding = pendingReply;
channel = pendingReplyBinding.channel;
value = channel.getGuildId();
channel = pendingReplyBinding.channel;
Reflect.apply(transitionTo, moduleValue, [Reflect.apply(CHANNEL, Routes, [value, channel.id,
pendingReplyBinding.message.id])]);
}
}
function onToggleReplyMention_84222() { // fn#84222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:9156, offset: 0x01f40002, size: 77 bytes, params: 1, frame: 13
var value2;
var moduleValue;
var setPendingReplyShouldMention;
let pendingReplyBinding = pendingReply;
if (pendingReplyBinding != null) {
value2 = environment.__proto__.__proto__;
moduleValue = require(11004) /* metro dependency 11004: PendingReplyActionCreators */;
setPendingReplyShouldMention = moduleValue.setPendingReplyShouldMention;
pendingReplyBinding = pendingReply;
Reflect.apply(setPendingReplyShouldMention, moduleValue, [pendingReplyBinding.channel.id,
!pendingReplyBinding.shouldMention]);
}
}
function componentWillLeaveN(a0) { // fn#84216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:8213, owner: componentWillLeave.n, offset: 0x01f3fc6d, size: 56 bytes, params: 2, frame: 12
var value;
var runOnJS;
var value2;
if (a0) {
value = environment.__proto__.__proto__.__proto__;
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
runOnJS = value.runOnJS;
value2 = environment.__proto__.__proto__;
Reflect.apply(runOnJS, value, [env2_5])();
}
}