/* Metro module 9910; source: modules/feedback/native/RatingSelector.tsx; dependencies: [31, 27, 9906, 33, 4501, 9911, 9912, 1244, 9916, 9917, 9921, 9922, 7975, 5278, 2] */ import Module09916 from '../../../by-id/module-09916.js'; /* Metro dependency 9916 */ import Module09921 from '../../../by-id/module-09921.js'; /* Metro dependency 9921 */ 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 CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */ function _fun77666(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77666, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10096:6, offset: 0x01e07100, size: 354 bytes, params: 8, frame: 20 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); ReactModule; let value = ReactNativeModule; const env0_3 = value.View; const env0_4 = value.Image; value = require(9906) /* metro dependency 9906: Constants */; const env0_5 = value.DEFAULT_RATINGS; const env0_6 = value.FeedbackRating; const env0_8 = (CreateStylesModule).createStyles({ratings: {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center'}, rating: {}, emoji: {'width': 64, 'height': 64, 'marginVertical': 24, 'marginHorizontal': 12}}); const env0_9 = (CreateStylesModule).createStyles({ratings: {'flexDirection': 'column', 'alignItems': 'flex-start', 'justifyContent': 'flex-start', 'gap': 16, 'marginBottom': 12}, rating: {width: '100%'}, emoji: {'width': 32, 'height': 32}}); (FileImportTrackerModule).fileFinishedImporting('modules/feedback/native/RatingSelector.tsx'); exports.default = RatingSelector; function RatingSelector({ratingOptions = DEFAULT_RATINGS, textLabels, selectedRating, onChangeRating}) { // fn#77667, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10096:641, offset: 0x01e07262, size: 151 bytes, params: 2, frame: 17 const styles = useStyles(); return ( {useEmojiConfigs(ratingOptions).map(_fun77673)} ); function useEmojiConfigs(a0) { // fn#77668, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10096:765, owner: RatingSelector.useEmojiConfigs, offset: 0x01e072f9, size: 309 bytes, params: 2, frame: 21 var environment; const object = {}; const value = environment.__proto__; const BAD = FeedbackRating.BAD; const object3 = {}; object3.selected = importDefault(9911) /* metro dependency 9911 */; object3.normal = (require(9912) /* metro dependency 9912: FeedbackModalSadDesaturated */).useFeedbackModalSadDesaturatedSource(); const BAD2 = FeedbackRating.BAD; object[BAD] = {source: object3, getLabel: function() { return require(dependencyMap[7]).intl.string(require(dependencyMap[7]).t['C/12Tt']); }, rating: BAD2}; const NEUTRAL = FeedbackRating.NEUTRAL; const object5 = {selected: Module09916}; object5.normal = (require(9917) /* metro dependency 9917: FeedbackModalNeutralDesaturated */).useFeedbackModalNeutralDesaturatedSource(); const NEUTRAL2 = FeedbackRating.NEUTRAL; object[NEUTRAL] = {source: object5, getLabel: function() { return require(dependencyMap[7]).intl.string(require(dependencyMap[7]).t.Xcb4cF); }, rating: NEUTRAL2}; const GOOD = FeedbackRating.GOOD; const object7 = {selected: Module09921}; object7.normal = (require(9922) /* metro dependency 9922: FeedbackModalHappyDesaturated */).useFeedbackModalHappyDesaturatedSource(); const GOOD2 = FeedbackRating.GOOD; object[GOOD] = {source: object7, getLabel: function() { return require(dependencyMap[7]).intl.string(require(dependencyMap[7]).t['1Vyb5J']); }, rating: GOOD2}; return a0.map(_fun77672); function _fun77672(a0) { // fn#77672, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10096:1301, offset: 0x00c3fbaf, size: 16 bytes, params: 2, frame: 2 return env0_0[a0]; } } function _fun77673(a0) { // fn#77673, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10096:1359, offset: 0x01e074ee, size: 368 bytes, params: 2, frame: 26 var environment; var r0; var value2; var PressableOpacity; var object; var value3; var value4; var RowButton; var object4; var value5; const rating = a0.rating; const {selected, normal} = a0.source; const getLabel = a0.getLabel; if (textLabels != null) { value4 = environment.__proto__; var viewBindingProps = {style: env0_3.rating}; RowButton = (require(7975) /* metro dependency 7975: RowButtonNative */).RowButton; object4 = {accessibilityRole: 'button', accessibilityLabel: getLabel()}; value5 = selectedRating === rating; object4.accessibilityState = {selected: value5}; object4.onPress = function() { return onChangeRating(rating); }; object4.icon = ; object4.label = textLabels[rating]; r0 = ( ); } else { value2 = environment.__proto__; PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity; object = {accessibilityRole: 'button', accessibilityLabel: getLabel()}; value3 = selectedRating === rating; object.accessibilityState = {selected: value3}; object.onPress = onPress_77675; r0 = ( ); } return r0; function onPress_77675() { // fn#77675, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10096:1758, offset: 0x016f88b2, size: 23 bytes, params: 1, frame: 11 return onChangeRating(rating); } } } } global.__d(_fun77666, 9910, [31, 27, 9906, 33, 4501, 9911, 9912, 1244, 9916, 9917, 9921, 9922, 7975, 5278, 2]) /* metro module 9910, dependencies: [31, 27, 9906, 33, 4501, 9911, 9912, 1244, 9916, 9917, 9921, 9922, 7975, 5278, 2] */;