/* Metro module 9204; source: design/components/Button/native/ImageButton.native.tsx; dependencies: [31, 27, 33, 4501, 4582, 697, 4583, 4017, 4577, 4581, 4585, 8342, 4573, 2] */ import ReanimatedRexport from '../../../../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */ 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 ReanimatedRexportModule from '../../../../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */ import * as CreateStylesModule from '../../Styles/native/createStyles.tsx'; /* Metro dependency 4501 */ import * as SpringModule from '../../../animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */ import * as SpringPresetsModule from '../../../animation/reanimated/spring/springPresets.tsx'; /* Metro dependency 4581 */ import * as ButtonHooksNativeModule from './ButtonHooks.native.tsx'; /* Metro dependency 4583 */ import * as BaseIconButtonNativeModule from './BaseIconButton.native.tsx'; /* Metro dependency 8342 */ function _fun72027(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#72027, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9389:6, offset: 0x01d36a0d, size: 242 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ReactModule; const env0_8 = (CreateStylesModule).createStyles(_fun72028); object = {code: "function ImageButtonNativeTsx1(){const{withSpring,pressed,ON_PRESS_SPRING}=this.__closure;return{opacity:withSpring(pressed.get()===1?1:0,ON_PRESS_SPRING,'animate-always')};}"}; value = value.forwardRef(_fun72029); (FileImportTrackerModule).fileFinishedImporting('design/components/Button/native/ImageButton.native.tsx'); exports.ImageButton = value; function _fun72028(a0, a1, a2) { // fn#72028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9389:186, offset: 0x01d36aff, size: 371 bytes, params: 4, frame: 17 const LARGE_BUTTON_PADDING = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).LARGE_BUTTON_PADDING; const value2 = a1 + 2 * (a0 === 'sm' ? (require(4582) /* metro dependency 4582: ButtonConstantsNative */).SMALL_BUTTON_PADDING : a0 !== 'md' ? LARGE_BUTTON_PADDING : (require(4582) /* metro dependency 4582: ButtonConstantsNative */).MEDIUM_BUTTON_PADDING); const object = {}; const object2 = {}; const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4; object2.paddingBottom = PX_4; const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8; object2.gap = PX_8; object2.alignItems = 'center'; object2.alignSelf = 'center'; object2.flexGrow = a2 ? 1 : 0; object.labelPressable = object2; const object3 = {'paddingHorizontal': 0, 'paddingVertical': 0}; object3.minHeight = value2; object3.minWidth = value2; object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round; object.pill = object3; object.imageWrapper = {width: value2, height: value2, position: 'relative'}; object.image = {width: value2, height: value2}; const object6 = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0}; const REDESIGN_IMAGE_BUTTON_PRESSED_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_IMAGE_BUTTON_PRESSED_BACKGROUND; object6.backgroundColor = REDESIGN_IMAGE_BUTTON_PRESSED_BACKGROUND; object6.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round; object.imageDim = object6; return object; } function _fun72029(a0, a1) { // fn#72029, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9389:1024, offset: 0x01d36c72, size: 913 bytes, params: 3, frame: 32 var r0; const BaseIconButton = (BaseIconButtonNativeModule).BaseIconButton; var BaseButton; let size = a0.size; size = size === undefined ? 'lg' : size; const label = a0.label; const grow = a0.grow; const image = a0.image; const accessibilityLabel = a0.accessibilityLabel; const maxFontSizeMultiplier = a0.maxFontSizeMultiplier; const onPressIn = a0.onPressIn; const onPressOut = a0.onPressOut; const object = {'size': 0, 'label': 0, 'grow': 0, 'image': 0, 'accessibilityLabel': 0, 'maxFontSizeMultiplier': 0, 'onPressIn': 0, 'onPressOut': 0}; silentSetPrototypeOf(object, null, undefined); let value = copyDataProperties({}, a0, object, image); const styles = useStyles(size, (ButtonHooksNativeModule).useIconSizeStyles(size, true, maxFontSizeMultiplier).width, grow); const value4 = (ReanimatedRexportModule).useSharedValue(0); const binding = env0_3; const value5 = binding.useCallback(_fun72030, [value4, onPressIn]); const value6 = binding.useCallback(_fun72031, [value4, onPressOut]); const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle; const w_720322 = w_72032; const object2 = {}; object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring; object2.pressed = value4; const ON_PRESS_SPRING = (SpringPresetsModule).ON_PRESS_SPRING; object2.ON_PRESS_SPRING = ON_PRESS_SPRING; w_720322.__closure = object2; w_720322.__workletHash = 17257158773379; w_720322.__initData = env0_9; const value7 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [w_720322]); const image2 = ; const View2 = (ReanimatedRexport).View; const view = ( {image2} ); if (label != null) { BaseButton = (require(4585) /* metro dependency 4585: BaseButtonNative */).BaseButton; var baseButtonProps = {style: styles.labelPressable, ...value}; baseButtonProps['variant'] = 'none'; baseButtonProps['accessibilityLabel'] = accessibilityLabel; value = ( ); value = ( {value} {((Text) => {label})((require(4573) /* metro dependency 4573: Text */).Text)} ); r0 = value; } else { value = ( ); r0 = value; } return r0; function _fun72030(a0) { // fn#72030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9389:1252, offset: 0x011f5e19, size: 48 bytes, params: 2, frame: 12 env0_2.set(1); if (onPressIn != null) { onPressIn(a0); } } function _fun72031(a0) { // fn#72031, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9389:1305, offset: 0x011f5e49, size: 47 bytes, params: 2, frame: 12 env0_2.set(0); if (onPressOut != null) { onPressOut(a0); } } function w_72032() { // fn#72032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9389:1372, offset: 0x01d37003, size: 105 bytes, params: 1, frame: 18 const withSpring = SpringModule.withSpring; const value3 = env0_2.get(); const value4 = 1; const r3 = value4 !== value3 ? 0 : value4; const ON_PRESS_SPRING = (SpringPresetsModule).ON_PRESS_SPRING; return {opacity: Reflect.apply(withSpring, SpringModule, [r3, ON_PRESS_SPRING, 'animate-always'])}; } } } global.__d(_fun72027, 9204, [31, 27, 33, 4501, 4582, 697, 4583, 4017, 4577, 4581, 4585, 8342, 4573, 2]) /* metro module 9204, dependencies: [31, 27, 33, 4501, 4582, 697, 4583, 4017, 4577, 4581, 4585, 8342, 4573, 2] */;