/* Metro module 9843; source: modules/reactions/native/ReactionEmojiOptionsActionSheet.tsx; dependencies: [31, 27, 4502, 6540, 3969, 33, 4501, 697, 3829, 6796, 566, 8533, 1423, 4080, 8633, 8635, 4573, 1244, 8629, 3857, 6797, 3856, 7151, 6805, 6739, 6231, 6238, 2] */ import SelectedGuildStore from '../../../stores/SelectedGuildStore.tsx'; /* Metro dependency 3969 */ import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */ import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */ import EmojiStore from '../../emojis/EmojiStore.tsx'; /* Metro dependency 6540 */ import Emoji from '../../emojis/native/Emoji.tsx'; /* Metro dependency 6739 */ import TidaWebformExperiment from '../../guild/TidaWebformExperiment.tsx'; /* Metro dependency 6796 */ 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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */ import * as UserSettingsModule from '../../user_settings/UserSettings.tsx'; /* Metro dependency 3829 */ import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */ import * as TableRowGroupNativeModule from '../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */ import * as TableRowNativeModule from '../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */ import * as ActionSheetNativeModule from '../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */ import * as EmojiPickerUtilsModule from '../../emoji_picker/EmojiPickerUtils.tsx'; /* Metro dependency 8533 */ function _fun77137(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77137, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10029:6, offset: 0x01df2b02, size: 622 bytes, params: 8, frame: 22 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = JsxRuntimeModule; const env0_9 = value.jsx; const env0_10 = value.jsxs; value = require(4501) /* metro dependency 4501: createStyles */; const createStyles = value.createStyles; object = {}; const object2 = {alignItems: 'center'}; let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8; object2.paddingTop = PX_8; let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16; object2.gap = PX_16; object.header = object2; const object3 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center', 'backgroundColor': null, 'borderRadius': null, 'borderWidth': 4}; const MESSAGE_HIGHLIGHT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MESSAGE_HIGHLIGHT_BACKGROUND_DEFAULT; object3.backgroundColor = MESSAGE_HIGHLIGHT_BACKGROUND_DEFAULT; object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl; const BORDER_STRONG = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_STRONG; object3.borderColor = BORDER_STRONG; PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8; object3.paddingVertical = PX_8; PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16; object3.paddingHorizontal = PX_16; PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8; object3.gap = PX_8; object.reactionPill = object3; object.emoji = {'width': 50, 'height': 50}; object.emojiText = {'fontSize': 24, 'lineHeight': 50, 'textAlign': 'center'}; object.reactionText = {'fontSize': 24, 'lineHeight': 50}; object.starIcon = {'height': 24, 'width': 24}; const ICON_FEEDBACK_WARNING = (importDefault(697) /* metro dependency 697: native */).colors.ICON_FEEDBACK_WARNING; object.starIconSelected = {tintColor: ICON_FEEDBACK_WARNING}; const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT; object.starIconUnselected = {tintColor: INTERACTIVE_TEXT_DEFAULT}; const env0_11 = Reflect.apply(createStyles, value, [object]); (FileImportTrackerModule).fileFinishedImporting('modules/reactions/native/ReactionEmojiOptionsActionSheet.tsx'); exports.default = ReactionEmojiOptionsActionSheet; function ReactionEmojiOptionsActionSheet({channelId, messageId, reaction, canRemoveReactions}) { // fn#77138, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10029:1012, offset: 0x01df2d70, size: 1572 bytes, params: 2, frame: 41 var r14; var r12; var defaultImport2; var getEmojiURL; var animated; const TableRow = (TableRowNativeModule).TableRow; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; var string; var t; const styles = useStyles(); const emoji = reaction.emoji; const value3 = emoji.id != null; const DeveloperMode = (UserSettingsModule).DeveloperMode; const value4 = DeveloperMode.useSetting(); const defaultImport = TidaWebformExperiment; const useExperiment = defaultImport.useExperiment; let object = {location: 'ReactionEmojiOptionsActionSheet'}; const tidaWebformEnabled = Reflect.apply(useExperiment, defaultImport, [object, {autoTrackExposure: false}]).tidaWebformEnabled; const guildId = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedGuildStore], function() { return SelectedGuildStore.getGuildId(); }); const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([EmojiStore], _fun77140, [emoji.id]); const env0_4 = value5; const value6 = (EmojiPickerUtilsModule).useIsFavoriteEmoji(guildId, value5); const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() { return AccessibilityStore.useReducedMotion; }); const AnimateEmoji = (UserSettingsModule).AnimateEmoji; if (emoji.id != null) { defaultImport2 = importDefault(1423) /* metro dependency 1423: AvatarUtils */; getEmojiURL = defaultImport2.getEmojiURL; object = {}; object.id = emoji.id; animated = emoji.animated; r14 = animated != null && animated; r14 = r14 && !useReducedMotion; r14 = r14 && AnimateEmoji.useSetting(); object.animated = r14; object.size = 96; r12 = Reflect.apply(getEmojiURL, defaultImport2, [object]); } else { r12 = undefined; } const r29 = reaction.burst_count > 0 ? reaction.burst_count : reaction.count; const binding = env0_4; const value11 = binding.useCallback(_fun77142, []); const value13 = binding.useCallback(_fun77144, [value11, value5, value6, binding.useCallback(_fun77143, [styles])]); const value14 = binding.useCallback(_fun77148, [emoji.id, value11]); const value15 = binding.useCallback(_fun77149, [r12, value11]); const value16 = binding.useCallback(_fun77150, [channelId, messageId, emoji, value11]); const r28 = emoji.name ?? ''; const ActionSheet = (ActionSheetNativeModule).ActionSheet; const value18 = ((Component) => )(Emoji); const Text = (TextModule).Text; const view = ( {value18} {r29} {value3 ? ':' + r28 + ':' : r28} ); const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup; let r19 = value3 && value5 != null; if (r19) { string = intl.string; t = (require(1244) /* metro dependency 1244: indexNative */).t; r19 = ( ); } const items5 = [r19]; items5[1] = value4 && value3 && ; items5[2] = value4 && tidaWebformEnabled && value3 && r12 != null && ; items5[3] = canRemoveReactions && {intl.string((require(1244) /* metro dependency 1244: indexNative */).t['zx/e4P'])}} onPress={value16} />; return ( {view} {items5} ); function _fun77140() { // fn#77140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10029:1389, offset: 0x01df3394, size: 50 bytes, params: 1, frame: 12 const id = emoji.id; const value2 = null; return value2 != id ? EmojiStore.getCustomEmojiById(emoji.id) : value2; } function _fun77142() { // fn#77142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10029:1733, offset: 0x01df33c6, size: 37 bytes, params: 1, frame: 11 const value = environment.__proto__; (ActionSheetActionCreators).hideActionSheet(); } function _fun77143(a0) { // fn#77143, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10029:1788, offset: 0x01df33eb, size: 138 bytes, params: 2, frame: 15 const object = {}; const stylesBinding = styles; copyDataProperties(object, stylesBinding.starIcon, undefined); if (a0) { copyDataProperties(object, stylesBinding.starIconSelected, undefined); } else { copyDataProperties(object, stylesBinding.starIconUnselected, undefined); } return ((Component) => )(a0 ? (require(8633) /* metro dependency 8633: StarIcon */).StarIcon : (require(8635) /* metro dependency 8635: StarOutlineIcon */).StarOutlineIcon); } function _fun77144() { // fn#77144, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10029:1967, offset: 0x01df3475, size: 207 bytes, params: 1, frame: 19 var environment; var content_771452; var binding; var value2; var moduleValue; var value; env0_7(); if (env0_4 != null) { content_771452 = content_77145; binding = ReactNativeModule.View; value2 = environment.__proto__; moduleValue = require(8629) /* metro dependency 8629: EmojiActionCreators */; if (binding) { moduleValue.unfavoriteEmoji(env0_4); value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */; value.open({key: 'EMOJI_UNFAVORITED', icon: icon, content: content_771452}); } else { moduleValue.favoriteEmoji(env0_4); value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */; value.open({key: 'EMOJI_FAVORITED', icon: icon_77147, content: content_771452}); } } function content_77145() { // fn#77145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10029:2000, offset: 0x01df3544, size: 154 bytes, params: 1, frame: 19 const value = environment.__proto__.__proto__; const Text = (TextModule).Text; const binding = env1_5; const intl = (IndexNativeModule).intl; const string = intl.string; const t = (IndexNativeModule).t; return ( {binding ? Reflect.apply(string, intl, [t.in1rga]) : Reflect.apply(string, intl, [t.mE2e8A])} ); } function icon() { // fn#77146, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10029:2245, offset: 0x01df35de, size: 18 bytes, params: 1, frame: 11 return env1_8(false); } function icon_77147() { // fn#77147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10029:2343, offset: 0x01df35f0, size: 18 bytes, params: 1, frame: 11 return env1_8(true); } } function _fun77148() { // fn#77148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10029:2403, offset: 0x01df3602, size: 97 bytes, params: 1, frame: 15 var value2; var moduleValue; if (emoji.id != null) { value2 = environment.__proto__; moduleValue = require(6797) /* metro dependency 6797: ClipboardUtilsNative */; moduleValue.copy(emoji.id); (require(3856) /* metro dependency 3856: ToastUtils */).presentCopiedToClipboard(); env0_7(); } } function _fun77149() { // fn#77149, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10029:2511, offset: 0x01df3663, size: 87 bytes, params: 1, frame: 15 var value2; if (env0_6 != null) { value2 = environment.__proto__; (require(6797) /* metro dependency 6797: ClipboardUtilsNative */).copy(env0_6); (require(3856) /* metro dependency 3856: ToastUtils */).presentCopiedToClipboard(); env0_7(); } } function _fun77150() { // fn#77150, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10029:2610, offset: 0x01df36ba, size: 63 bytes, params: 1, frame: 17 let value = environment.__proto__; value = importAll(7151) /* metro dependency 7151: ReactionActionCreators */; value.removeEmojiReactions(channelId, messageId, emoji); env0_7(); } } } global.__d(_fun77137, 9843, [31, 27, 4502, 6540, 3969, 33, 4501, 697, 3829, 6796, 566, 8533, 1423, 4080, 8633, 8635, 4573, 1244, 8629, 3857, 6797, 3856, 7151, 6805, 6739, 6231, 6238, 2]) /* metro module 9843, dependencies: [31, 27, 4502, 6540, 3969, 33, 4501, 697, 3829, 6796, 566, 8533, 1423, 4080, 8633, 8635, 4573, 1244, 8629, 3857, 6797, 3856, 7151, 6805, 6739, 6231, 6238, 2] */;