/* Metro module 6516; source: design/components/Sheet/native/BottomSheetBackdrop.native.tsx; dependencies: [31, 33, 4501, 6277, 5321, 4017, 4562, 2] */ import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ 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 '../../Styles/native/createStyles.tsx'; /* Metro dependency 4501 */ import * as BackdropNativeModule from '../../Backdrop/native/Backdrop.native.tsx'; /* Metro dependency 4562 */ import * as Module06277Module from '../../../../by-id/module-06277.js'; /* Metro dependency 6277 */ function _fun51237(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#51237, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6694:6, offset: 0x0122cb15, size: 213 bytes, params: 8, frame: 21 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ReactModule; const env0_4 = (CreateStylesModule).createStyles({container: {flex: 1}}); object = {code: 'function BottomSheetBackdropNativeTsx1(){const{runOnJS,handleOnPress}=this.__closure;runOnJS(handleOnPress)();}'}; object = {code: 'function BottomSheetBackdropNativeTsx2(){const{interpolate,animatedIndex,disappearsOnIndex,appearsOnIndex,opacity}=this.__closure;return{opacity:interpolate(animatedIndex.get(),[-1,disappearsOnIndex,appearsOnIndex],[0,0,opacity])};}'}; value = value.memo(_fun51238); (FileImportTrackerModule).fileFinishedImporting('design/components/Sheet/native/BottomSheetBackdrop.native.tsx'); exports.BottomSheetBackdrop = value; function _fun51238({animatedIndex, opacity, appearsOnIndex, disappearsOnIndex, pressBehavior, onPress, style}) { // fn#51238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6694:542, offset: 0x0122cbea, size: 589 bytes, params: 2, frame: 30 opacity = opacity === undefined ? 1 : opacity; appearsOnIndex = appearsOnIndex === undefined ? 0 : appearsOnIndex; const appearsOnIndex2 = appearsOnIndex; disappearsOnIndex = disappearsOnIndex === undefined ? -1 : disappearsOnIndex; pressBehavior = pressBehavior === undefined ? 'close' : pressBehavior; const onPress2 = onPress; const style2 = style; const styles = useStyles(); const {snapToIndex, close} = (Module06277Module).useBottomSheet(); const binding = appearsOnIndex2; const value3 = binding.useCallback(function() { if (onPress != null) { onPress(); } if (pressBehavior === 'close') { close(); } else if (pressBehavior === 'collapse') { snapToIndex(disappearsOnIndex); } else if (typeof pressBehavior === 'number') { snapToIndex(pressBehavior); } }, [snapToIndex, close, disappearsOnIndex, pressBehavior, onPress]); const Gesture = (require(5321) /* metro dependency 5321 */).Gesture; const value4 = Gesture.Tap(); const onEnd = value4.onEnd; let closure = I_51240; closure.__closure = {runOnJS: (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS, handleOnPress: value3}; closure.__workletHash = 3995467602852; closure.__initData = onPress2; const value5 = Reflect.apply(onEnd, value4, [closure]); const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */; const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle; closure = S_51241; closure.__closure = {interpolate: reanimatedRexportModule.interpolate, animatedIndex: animatedIndex, disappearsOnIndex: disappearsOnIndex, appearsOnIndex: appearsOnIndex, opacity: opacity}; closure.__workletHash = 1140766381376; closure.__initData = style2; const value7 = binding.useMemo(_fun51242, [styles.container, style, Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure])]); const Backdrop = (BackdropNativeModule).Backdrop; const backdrop = ( ); if (pressBehavior === 'none') { return backdrop; } else { const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector; return ( {backdrop} ); } function I_51240() { // fn#51240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6694:878, offset: 0x0122cea5, size: 48 bytes, params: 1, frame: 12 let value = environment.__proto__; value = require(4017) /* metro dependency 4017: ReanimatedRexport */; value.runOnJS(env0_10)(); } function S_51241() { // fn#51241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6694:1044, offset: 0x0122ced5, size: 110 bytes, params: 1, frame: 17 let value = environment.__proto__; value = require(4017) /* metro dependency 4017: ReanimatedRexport */; return {opacity: value.interpolate(animatedIndex.get(), [-1, disappearsOnIndex, appearsOnIndex], [0, 0, opacity])}; } function _fun51242() { // fn#51242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6694:1288, offset: 0x0122cf43, size: 38 bytes, params: 1, frame: 3 return [styles.container, style, env0_11]; } } } global.__d(_fun51237, 6516, [31, 33, 4501, 6277, 5321, 4017, 4562, 2]) /* metro module 6516, dependencies: [31, 33, 4501, 6277, 5321, 4017, 4562, 2] */;