/* Metro module 15699; source: modules/feedback/native/FeedbackActionSheetV2.tsx; dependencies: [57, 31, 27, 9906, 33, 4501, 697, 4080, 22, 6266, 4594, 5080, 9928, 1962, 1244, 4573, 9910, 8950, 6231, 6238, 4578, 1585, 6275, 6758, 6806, 6277, 2] */ import Module00022 from '../../../by-id/module-00022.js'; /* Metro dependency 22 */ import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */ import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */ import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */ import UsePrevious from '../../../hooks/usePrevious.tsx'; /* Metro dependency 6266 */ 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 ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */ import * as UseMountEffectModule from '../../../hooks/useMountEffect.tsx'; /* Metro dependency 4594 */ import * as TableRowNativeModule from '../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */ import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */ import * as Module06277Module from '../../../by-id/module-06277.js'; /* Metro dependency 6277 */ import * as BottomSheetTitleHeaderNativeModule from '../../../design/components/Sheet/native/BottomSheetTitleHeader.native.tsx'; /* Metro dependency 6758 */ import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 9906 */ function _fun120503(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:6, offset: 0x0252cf71, size: 347 bytes, params: 8, frame: 22 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = JsxRuntimeModule; const env0_7 = value.jsx; const env0_8 = value.Fragment; const env0_9 = value.jsxs; value = require(4501) /* metro dependency 4501: createStyles */; const createStyles = value.createStyles; object = {}; let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16; object.container = {padding: PX_16}; object.ratingsBody = {textAlign: 'center'}; PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16; object.problemsList = {marginBottom: PX_16}; const env0_10 = Reflect.apply(createStyles, value, [object]); (FileImportTrackerModule).fileFinishedImporting('modules/feedback/native/FeedbackActionSheetV2.tsx'); exports.default = FeedbackActionSheetV2; function closeActionSheet_120504() { // fn#120504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:347, offset: 0x01e08208, size: 37 bytes, params: 1, frame: 11 (ActionSheetActionCreators).hideActionSheet(); } function shuffleOptionsTree(a0) { // fn#120505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:425, offset: 0x0252d0cc, size: 60 bytes, params: 2, frame: 13 return Module00022.shuffle(a0.map(_fun120506)); function _fun120506(a0) { // fn#120506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:452, offset: 0x0252d108, size: 94 bytes, params: 2, frame: 14 const object = {}; copyDataProperties(object, a0, undefined); let value = environment.__proto__; value = Reflect.apply((importDefault(22) /* metro dependency 22 */).shuffle, value, [a0.problemOptions]); value = value.concat(a0.freeformConfig ?? []); object['problemOptions'] = value; return object; } } function FeedbackActionSheetV2({headerLabel, ratingBody, ratingOptions, showHeaderCloseButton, hideDontShowAgainCheckbox, categoriesHeader, initialRating, optionsTree, onMount, trackOpen, trackReport}) { // fn#120507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15907:663, offset: 0x0252d166, size: 1737 bytes, params: 2, frame: 43 var r7; var r16; var r13; var problemsHeader; var jsxRuntimeEnv0_8Binding; var items4; const Button = (ButtonNativeModule).Button; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; var items2; var items3; var TableCheckboxRow; initialRating = initialRating === undefined ? null : initialRating; let env0_4 = undefined; const styles = useStyles(); let binding = env0_4; const value5 = binding.useRef(null); env0_4 = value5; const value6 = (UsePrevious)(optionsTree); let useState = binding.useState; const value7 = Reflect.apply(useState, binding, [shuffleOptionsTree(optionsTree)]); const binding2 = trackReport; const value8 = binding2(value7, 2); const property = value8[0]; const env0_7 = value8[1]; binding.useEffect(_fun120508, [optionsTree, value6]); useState = binding.useState; const value10 = binding2(Reflect.apply(useState, binding, [false]), 2); const property2 = value10[0]; const env0_9 = value10[1]; useState = binding.useState; const value11 = binding2(Reflect.apply(useState, binding, [initialRating]), 2); const property3 = value11[0]; const env0_11 = value11[1]; const value12 = binding.useState(property.length !== 1 ? null : property[0]); binding = trackReport; const value13 = binding(value12, 2); const property5 = value13[0]; const env0_13 = value13[1]; const binding3 = env0_4; useState = binding3.useState; const value14 = binding(Reflect.apply(useState, binding3, [null]), 2); const property6 = value14[0]; const env0_15 = value14[1]; useState = binding3.useState; const value15 = binding(Reflect.apply(useState, binding3, [false]), 2); const env0_16 = value15[0]; const env0_17 = value15[1]; (importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() { if (onMount != null) { onMount(); } trackOpen(); }); (UseMountEffectModule).useUnmountEffect(_fun120510); const value16 = binding3.useCallback(_fun120512, []); const env0_18 = binding3.useCallback(_fun120513, []); const env0_19 = binding3.useCallback(_fun120514, [property5]); if (property3 == null) { jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8; if (ratingBody != null) { const Text = (require(4573) /* metro dependency 4573: Text */).Text; r16 = ( {ratingBody} ); } else { r16 = null; } items3 = [r16]; items3[1] = ((Component) => )(importDefault(9910) /* metro dependency 9910: RatingSelector */); if (hideDontShowAgainCheckbox) { r16 = null; } else { TableCheckboxRow = (require(8950) /* metro dependency 8950: TableCheckboxRowNative */).TableCheckboxRow; r16 = ( ); } items3[2] = r16; r7 = ( <> {items3} ); r13 = headerLabel; } else if (property3 === FeedbackRating.GOOD) { if (property5 != null && property6 == null) { problemsHeader = property5.problemsHeader; jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8; items4 = [ {((TableRowGroup) => {property5.problemOptions.map(_fun120519)})((require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup)} , ]; items4[1] = (