/* 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] */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
import UseDisplayNameStyles from '../../display_name_styles/hooks/useDisplayNameStyles.tsx'; /* Metro dependency 4635 */
import Module08523 from '../../../by-id/module-08523.js'; /* Metro dependency 8523 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
import * as MobileVisualRefreshExperimentModule from '../../themes/experiments/MobileVisualRefreshExperiment.tsx'; /* Metro dependency 1357 */
import * as UseA11yRolesNativeModule from '../../../external/discord_common/js/packages/design/hooks/useA11yRolesNative.tsx'; /* Metro dependency 3874 */
import * as ClientThemesUtilsModule from '../../client_themes/native/ClientThemesUtils.tsx'; /* Metro dependency 3963 */
import * as ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as TimingModule from '../../../design/animation/reanimated/timing/timing.tsx'; /* Metro dependency 4504 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as EnhancedRoleColorUtilsModule from '../../premium/enhanced_role_colors/native/EnhancedRoleColorUtils.tsx'; /* Metro dependency 8206 */
import * as UseDisplayNameStylesFontModule from '../../display_name_styles/native/useDisplayNameStylesFont.tsx'; /* Metro dependency 8699 */
import * as TransitionGroupModule from '../../../external/discord_common/js/packages/transition-group/TransitionGroup.tsx'; /* Metro dependency 11206 */
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
const env0_0 = require;
const ChatInputReplyBar2 = ChatInputReplyBar;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ReactModule;
object = {duration: 250};
const STANDARD_EASING = (NativeModule).STANDARD_EASING;
object.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);
object = {code: 'function ChatInputContextBarTsx1(){const{stylesBackgroundColor,chatInputFloating,heightSv}=this.__closure;return{backgroundColor:stylesBackgroundColor,...(chatInputFloating?{maxHeight:heightSv.get()}:{height:heightSv.get()})};}'};
object = {code: 'function ChatInputContextBarTsx2(finished){const{runOnJS,handleTransitionFinished}=this.__closure;if(finished){runOnJS(handleTransitionFinished)();}}'};
const env0_18 = value.forwardRef(_fun84209);
value = value.memo(ChatInputContextBar);
(FileImportTrackerModule).fileFinishedImporting('modules/chat_input/native/ChatInputContextBar.tsx');
exports.default = value;
exports.ChatInputReplyBar = ChatInputReplyBar2;
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 = (PressablesModule).PressableOpacity;
const intl = (IndexNativeModule).intl;
var string;
const t = (IndexNativeModule).t;
var items3;
const Text = (TextModule).Text;
var items2;
const useMobileVisualRefreshConfig = MobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const object = {location: 'ChatInputContextBar'};
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, MobileVisualRefreshExperimentModule,
[object]).chatInputFloating;
const styles = useStyles();
if (chatInputFloating) {
var viewBindingProps = {style: styles.contextBarRow};
string = intl.string;
items2 = [
{Reflect.apply(string, intl, [t['5IEsGx']])}
,
];
string = intl.string;
items2[1] = (
{((Icon) => )((require(1305) /* metro dependency 1305: native */).Icon)}
);
r0 = (
{items2}
);
} else {
var pressableOpacityProps = {'activeOpacity': 0.5, 'accessibilityRole': 'button',
accessibilityLabel: intl.string(t.jSnJGT), onPress: onCancelReplying, style: styles.contextBarRow};
items3 = [
{((Icon) => )((require(1305) /* metro dependency 1305: native */).Icon)}
,
];
items3[1] = (
{intl.string(t['5IEsGx'])}
);
r0 = (
{items3}
);
}
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 object6;
var r10;
var r17;
var r5;
var r16;
var r14;
const PressableOpacity = (PressablesModule).PressableOpacity;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
var string;
const Text = (TextModule).Text;
var object;
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
var Sizes;
var items2;
var object3;
var items4;
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 useCheckboxA11yNative = UseA11yRolesNativeModule.useCheckboxA11yNative;
object6 = {};
let shouldMention = pendingReply.shouldMention;
object6.checked = shouldMention;
const {accessibilityRole, accessibilityState} = Reflect.apply(useCheckboxA11yNative, UseA11yRolesNativeModule,
[object6]);
const colorString = pendingReplyAuthor.colorString;
const colorStrings = pendingReplyAuthor.colorStrings;
const colorStrings2 = colorStrings;
const nick = pendingReplyAuthor.nick;
const guildId = pendingReplyAuthor.guildId;
const env0_6 = colorStrings2.useMemo(function() {
var roleStyleBinding = roleStyle;
var value2 = undefined;
return roleStyleBinding === 'hidden' ? value2 : colorString != null ? [{color: colorString}] : value2;
}, [colorString, roleStyle]);
const env0_7 = (UseDisplayNameStylesFontModule).useDisplayNameStylesFont({displayNameStyles: (UseDisplayNameStyles)({userId: pendingReply.message.author.id,
guildId: guildId})});
const env0_9 = (EnhancedRoleColorUtilsModule).useIsRoleStyleAndRoleColorsEligibleForERC(guildId,
pendingReply.message.author.id, roleStyle,
(EnhancedRoleColorUtilsModule).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) {
object6 = {lineClamp: 1};
r10 = r6 ? 'text-sm/normal' : 'text-sm/medium';
object6.variant = r10;
r10 = r6 ? 'text-strong' : 'text-default';
object6.color = r10;
r5 = (
{closure('text-sm/semibold')}
);
} 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};
object = {lineClamp: 1};
r17 = r6 ? 'text-sm/normal' : 'text-sm/medium';
object.variant = r17;
r17 = r6 ? 'text-strong' : 'text-default';
object.color = r17;
r5 = (
{closure('text-sm/semibold')}
);
}
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 = (
);
} 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 = [
,
];
object3 = {};
r16 = r6 ? 'text-sm/semibold' : 'text-sm/bold';
object3.variant = r16;
object3.color = 'text-muted';
shouldMention = pendingReply.shouldMention;
object3.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] = (
{r16}
);
r14 = (
{items2}
);
} else {
r14 = null;
}
} else {
r14 = null;
}
const items3 = [!r6 && r10, r5];
if (r6) {
var viewBinding2Props = {style: styles.floatingRightActions};
items4 = [r14];
items4[1] = pendingReply?.showMentionToggle && ;
items4[2] = r10;
r5 = (
{items4}
);
} else {
r5 = r14;
}
items3[2] = r5;
return (
{items3}
);
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 = (IndexNativeModule).intl;
return intl.format((IndexNativeModule).t['8E4GxS'], {userHook: userHook_84205});
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 = (TextModule).Text;
var object2;
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 = (
{nick}
);
} else if (colorString != null) {
value6 = environment.__proto__.__proto__;
jsxRuntimeEnv2_12Binding = jsxRuntimeEnv2_12;
value7 = undefined;
const RoleDot = (require(1305) /* metro dependency 1305: native */).RoleDot;
items2 = [
,
];
items2[1] = (
{nick}
);
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 = (
{nick}
);
}
return r0;
}
}
}
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 useMobileVisualRefreshConfig = MobileVisualRefreshExperimentModule.useMobileVisualRefreshConfig;
const chatInputFloating = Reflect.apply(useMobileVisualRefreshConfig, MobileVisualRefreshExperimentModule,
[{location: 'ChatInputContextBar'}]).chatInputFloating;
const styles = useStyles();
const Text = (TextModule).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 = (IndexNativeModule).intl;
let string = intl.string;
const text = (
{Reflect.apply(string, intl, [(IndexNativeModule).t.rtNXxN])}
);
const PressableOpacity = (PressablesModule).PressableOpacity;
string = intl.string;
const qv9j1K = (IndexNativeModule).t.qv9j1K;
const contextCancelIconWrapper = chatInputFloating ? undefined : styles.contextCancelIconWrapper;
const Icon = (NativeModule).Icon;
const iconProps = {source: Module08523};
const Icon2 = (NativeModule).Icon;
const Sizes = Icon2.Sizes;
iconProps.size = chatInputFloating ? Sizes.CUSTOM : Sizes.SMALL_20;
iconProps.style = chatInputFloating ? styles.floatingCloseIcon : undefined;
const pressableOpacity = (
);
const jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
const object2 = {};
const items2 = [];
if (chatInputFloating) {
items2[0] = text;
items2[1] = (
{pressableOpacity}
);
object2.children = items2;
} else {
items2[0] = pressableOpacity;
items2[1] = text;
object2.children = items2;
}
return (
{((Fragment) => )(jsxRuntimeEnv0_12Binding)}
);
}
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 object = {};
const object2 = {'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;
object2.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;
object2.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;
object2.gap = CHAT_INPUT_CONTEXT_BAR_GAP;
object.contextBarRow = object2;
object.floatingReplyTextWrapper = {'flexShrink': 1, 'minWidth': 0};
object.contextCancelIconWrapper = {'paddingHorizontal': 12, 'paddingVertical': 10};
object.contextButtonText = {'flexGrow': 1, 'flexShrink': 1, 'justifyContent': 'center', 'alignSelf': 'stretch',
'paddingRight': 12, 'paddingVertical': 10};
const object3 = {};
object3.borderBottomWidth = StyleSheet.hairlineWidth;
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
object3.borderBottomColor = BORDER_MUTED;
object3.overflow = 'hidden';
object.floatingContextBar = object3;
object.replyMentionButton = {'flexDirection': 'row', 'alignItems': 'center', 'paddingHorizontal': 12,
'paddingVertical': 10};
let CONTROL_BRAND_FOREGROUND = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_BRAND_FOREGROUND;
object.replyMentionButtonActive = {color: CONTROL_BRAND_FOREGROUND};
const object5 = {};
let CHAT_INPUT_REPLY_MENTION_ICON_SIZE = (importDefault(697) /* metro dependency 697: native */).modules.mobile.CHAT_INPUT_REPLY_MENTION_ICON_SIZE;
object5.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;
object5.height = CHAT_INPUT_REPLY_MENTION_ICON_SIZE;
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object5.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;
object5.marginRight = CHAT_INPUT_REPLY_MENTION_ICON_MARGIN_RIGHT;
object.replyMentionIcon = object5;
CONTROL_BRAND_FOREGROUND = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_BRAND_FOREGROUND;
object.replyMentionIconActive = {tintColor: CONTROL_BRAND_FOREGROUND};
object.floatingRightActions = {'flexGrow': 1, 'flexShrink': 0, 'flexDirection': 'row', 'alignItems': 'center',
'justifyContent': 'flex-end', 'gap': 8};
object.floatingMentionGroup = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 2};
const object7 = {};
object7.width = StyleSheet.hairlineWidth;
object7.alignSelf = 'stretch';
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object7.backgroundColor = BORDER_SUBTLE;
object.floatingDivider = object7;
const INTERACTIVE_ICON_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_ICON_DEFAULT;
object.floatingCloseIcon = {'width': 16, 'height': 16, tintColor: INTERACTIVE_ICON_DEFAULT};
return object;
}
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 useGradientValue = ClientThemesUtilsModule.useGradientValue;
const GradientPercentage = ClientThemesUtilsModule.GradientPercentage;
const END = GradientPercentage.END;
const value2 = Reflect.apply(useGradientValue, ClientThemesUtilsModule, [END]);
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 = (ReanimatedRexportModule).useSharedValue(0);
const env0_3 = value5;
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const o_842102 = o_84210;
o_842102.__closure = {stylesBackgroundColor: backgroundColor, chatInputFloating: chatInputFloating,
heightSv: value5};
o_842102.__workletHash = 3976432455712;
o_842102.__initData = env0_16;
const value6 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [o_842102]);
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 = (ReanimatedRexport).View;
return (
{children}
);
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 object = {};
object.backgroundColor = backgroundColor;
const chatInputFloatingBinding = chatInputFloating;
const object2 = {};
const binding = env0_3;
const value = binding.get();
if (chatInputFloatingBinding) {
object2.maxHeight = value;
} else {
object2.height = value;
}
copyDataProperties(object, object2, binding);
return object;
}
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 (ReactNativeModule.StyleSheet.current != null) {
ReactNativeModule.StyleSheet.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 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;
Reflect.apply(set, binding, [TimingModule.withTiming(env1_2, env2_13)]);
}
function componentDidEnter() { // fn#84214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:8060, offset: 0x01f3fb91, size: 63 bytes, params: 1, frame: 16
const binding = env1_3;
const set = binding.set;
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 withTiming = TimingModule.withTiming;
const binding2 = env2_13;
const componentWillLeaveN2 = componentWillLeaveN;
const object = {};
object.runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
object.handleTransitionFinished = env1_5;
componentWillLeaveN2.__closure = object;
componentWillLeaveN2.__workletHash = 10908592279914;
componentWillLeaveN2.__initData = env2_17;
Reflect.apply(set, binding, [Reflect.apply(withTiming, TimingModule, [0, binding2, 'respect-motion-settings',
componentWillLeaveN2])]);
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])();
}
}
}
}
}
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 = (TransitionGroupModule).TransitionGroup;
return (
{pendingReply != null && value4 != null && ((Component) => )(env0_18)}
{pendingReply != null && value4 == null && ((Component) => )(env0_18)}
{pendingEdit != null && ((Component) => )(env0_18)}
);
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 onCancelEditing() { // fn#84219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11188:8577, offset: 0x01f3fe60, size: 32 bytes, params: 1, frame: 9
const current = chatInputRef.current;
if (current != null) {
current.handleCancelEditing();
}
}
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 object;
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;
object = {};
id = pendingReply == null ? value3 : pendingReply.message.id;
object.message_id = id;
channelBinding = channel;
id = channelBinding.id;
object.channel_id = id;
object.guild_id = channelBinding.guild_id;
object.context_action = 'reply';
object.reason = (require(11005) /* metro dependency 11005: LongPressMessageActionSheetUtils */).getContextBarCancelReason('reply',
'cancel');
currentUser = UserStore.getCurrentUser();
id = currentUser == null ? value3 : currentUser.id;
object.is_own_message = id === (pendingReply == null ? value3 : pendingReply.message.author.id);
Reflect.apply(track, defaultImport, [CHAT_CONTEXT_BAR_ACTION_CANCELED, object]);
}
}
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]);
}
}
}
}
}
global.__d(_fun84199, 11002, [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]) /* metro module 11002, 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] */;