/* Metro module 4583; source: design/components/Button/native/ButtonHooks.native.tsx; dependencies: [31, 4501, 3868, 697, 4002, 3860, 4017, 4577, 4581, 4582, 4584, 4580, 4573, 477, 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 UseTokenModule from '../../../tokens/native/useToken.tsx'; /* Metro dependency 3860 */ import * as NativeModule from '../../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */ import * as ReanimatedRexportModule from '../../../../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */ 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 UseFontScaleModule from '../../../../modules/screen/native/useFontScale.tsx'; /* Metro dependency 4584 */ function _fun38865(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#38865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:6, offset: 0x010ce082, size: 754 bytes, params: 8, frame: 25 const env0_0 = require; const useProfileThemedButtonStyles2 = useProfileThemedButtonStyles; const useForegroundColor2 = useForegroundColor; const useButtonTextColorStyles2 = useButtonTextColorStyles; const useButtonScaleStyles2 = useButtonScaleStyles; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_5 = (require(4501) /* metro dependency 4501: createStyles */).experimental_createToken(function() { return '#161CBB'; }); const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).experimental_createToken(function() { return '#1318A0'; }); object = {}; const CONTROL_PRIMARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_PRIMARY_TEXT_DEFAULT; object.primary = CONTROL_PRIMARY_TEXT_DEFAULT; let WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE; object['experimental_welcome-secondary'] = WHITE; const CONTROL_SECONDARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_SECONDARY_TEXT_DEFAULT; object.secondary = CONTROL_SECONDARY_TEXT_DEFAULT; const REDESIGN_BUTTON_TERTIARY_TEXT = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_TERTIARY_TEXT; object.tertiary = REDESIGN_BUTTON_TERTIARY_TEXT; let CONTROL_CRITICAL_PRIMARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_CRITICAL_PRIMARY_TEXT_DEFAULT; object.destructive = CONTROL_CRITICAL_PRIMARY_TEXT_DEFAULT; CONTROL_CRITICAL_PRIMARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_CRITICAL_PRIMARY_TEXT_DEFAULT; object['critical-primary'] = CONTROL_CRITICAL_PRIMARY_TEXT_DEFAULT; const CONTROL_CRITICAL_SECONDARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_CRITICAL_SECONDARY_TEXT_DEFAULT; object['critical-secondary'] = CONTROL_CRITICAL_SECONDARY_TEXT_DEFAULT; const CONTROL_CONNECTED_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_CONNECTED_TEXT_DEFAULT; object.active = CONTROL_CONNECTED_TEXT_DEFAULT; const CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT; object['primary-overlay'] = CONTROL_OVERLAY_PRIMARY_TEXT_DEFAULT; const CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT; object['secondary-overlay'] = CONTROL_OVERLAY_SECONDARY_TEXT_DEFAULT; WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE; object['experimental_premium-primary'] = WHITE; const TEXT_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_BRAND; object['experimental_premium-secondary'] = TEXT_BRAND; const CONTROL_ICON_ONLY_ICON_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_ICON_ONLY_ICON_DEFAULT; object['icon-only'] = CONTROL_ICON_ONLY_ICON_DEFAULT; const CONTROL_EXPRESSIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_EXPRESSIVE_TEXT_DEFAULT; object.expressive = CONTROL_EXPRESSIVE_TEXT_DEFAULT; value = require(4501) /* metro dependency 4501: createStyles */; value = value.createStyleProperties(_fun38874); object = {code: 'function ButtonHooksNativeTsx1(){const{themedStyles,colors,interpolateColor,pressed}=this.__closure;var _themedStyles$backgro,_themedStyles,_themedStyles$borderC,_themedStyles2;const backgroundColor=(_themedStyles$backgro=(_themedStyles=themedStyles)===null||_themedStyles===void 0?void 0:_themedStyles.backgroundColor)!==null&&_themedStyles$backgro!==void 0?_themedStyles$backgro:[colors.backgroundInactive,colors.backgroundPressed];const borderColor=(_themedStyles$borderC=(_themedStyles2=themedStyles)===null||_themedStyles2===void 0?void 0:_themedStyles2.borderColor)!==null&&_themedStyles$borderC!==void 0?_themedStyles$borderC:[colors.borderInactive,colors.borderPressed];return{backgroundColor:interpolateColor(pressed.get(),[0,1],backgroundColor),borderColor:interpolateColor(pressed.get(),[0,1],borderColor)};}'}; object = {code: "function ButtonHooksNativeTsx2(){const{width,scaleAmountInPx,withSpring,interpolate,pressed,ON_PRESS_SPRING}=this.__closure;const scale=width.get()>0?(width.get()-scaleAmountInPx)/width.get():1;return{transform:[{scale:withSpring(interpolate(pressed.get(),[0,1],[1,scale]),ON_PRESS_SPRING,'animate-always')}]};}"}; (FileImportTrackerModule).fileFinishedImporting('design/components/Button/native/ButtonHooks.native.tsx'); exports.SAFE_TRANSPARENT_COLOR = 'rgba(0,0,0,0.001)'; exports.useProfileThemedButtonStyles = useProfileThemedButtonStyles2; exports.useForegroundColor = useForegroundColor2; exports.useButtonColorStyles = value; exports.useButtonTextColorStyles = useButtonTextColorStyles2; exports.useIconTintStyles = function(a0) { var object = {}; object.tintColor = useButtonTextColorStyles(a0).color; return object; }; exports.useGradientPillStyles = useGradientPillStyles; exports.useButtonPillStyles = useButtonPillStyles; exports.useButtonScaleStyles = useButtonScaleStyles2; exports.useButtonPressAnimationProps = useButtonPressAnimationProps; exports.useIconSizeStyles = useIconSizeStyles; function useProfileThemedButtonStyles(a0) { // fn#38866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:232, offset: 0x010ce374, size: 102 bytes, params: 2, frame: 16 const env0_0 = a0; const {primaryColor, theme} = (NativeModule).useThemeContext(); return ReactModule.useMemo(_fun38867, [theme, primaryColor, a0]); function _fun38867() { // fn#38867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:350, offset: 0x010ce3da, size: 737 bytes, params: 1, frame: 21 var r10; var r6; var value2; var isThemeLight2; var moduleValue2; var setColorOpacity; var object; var items2; var moduleValue4; var value5; var isThemeLight3; var moduleValue6; var items3; var moduleValue8; var value8; var WHITE; var moduleValue9; var getContrastingColor; var value9; var value; let primaryColorBinding = primaryColor; if (primaryColorBinding != null) { var binding = env0_0; if (binding === 'primary') { value8 = environment.__proto__; WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE; moduleValue9 = require(3868) /* metro dependency 3868: native */; getContrastingColor = moduleValue9.getContrastingColor; primaryColorBinding = primaryColor; object = {base: WHITE}; object.contrastRatio = (require(3868) /* metro dependency 3868: native */).WCAGContrastRatios.HighContrastText; value = Reflect.apply(getContrastingColor, moduleValue9, [primaryColorBinding, object]); value9 = (require(3868) /* metro dependency 3868: native */).darkenColor(value, 0.5); return {backgroundColor: [value, value9], borderColor: [value, value9], color: WHITE}; } if (binding === 'secondary') { value5 = environment.__proto__; isThemeLight3 = (require(4002) /* metro dependency 4002: shared */).isThemeLight(theme); moduleValue6 = require(3868) /* metro dependency 3868: native */; setColorOpacity = moduleValue6.setColorOpacity; r6 = isThemeLight3 ? Reflect.apply(setColorOpacity, moduleValue6, ['white', 0.72]) : Reflect.apply(setColorOpacity, moduleValue6, ['white', 0.24]); items3 = [r6]; value = (require(4002) /* metro dependency 4002: shared */).isThemeLight(theme); moduleValue8 = require(3868) /* metro dependency 3868: native */; setColorOpacity = moduleValue8.setColorOpacity; r6 = value ? Reflect.apply(setColorOpacity, moduleValue8, ['white', 0.62]) : Reflect.apply(setColorOpacity, moduleValue8, ['white', 0.34]); items3[1] = r6; return {backgroundColor: items3, borderColor: [env1_4, env1_4], color: undefined}; } if (binding === 'tertiary') { value2 = environment.__proto__; isThemeLight2 = (require(4002) /* metro dependency 4002: shared */).isThemeLight(theme); moduleValue2 = require(3868) /* metro dependency 3868: native */; setColorOpacity = moduleValue2.setColorOpacity; r10 = isThemeLight2 ? Reflect.apply(setColorOpacity, moduleValue2, [primaryColor, 0.4]) : Reflect.apply(setColorOpacity, moduleValue2, ['white', 0.1]); items2 = [r10]; value = (require(4002) /* metro dependency 4002: shared */).isThemeLight(theme); moduleValue4 = require(3868) /* metro dependency 3868: native */; items2[1] = value ? moduleValue4.darkenColor(r10, 0.3) : moduleValue4.setColorOpacity('white', 0.2); return {backgroundColor: items2, borderColor: [env1_4, env1_4], color: undefined}; } } return null; } } function useForegroundColor(a0) { // fn#38868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:2051, offset: 0x010ce6bb, size: 49 bytes, params: 2, frame: 12 return (UseTokenModule).useToken(env0_7[a0]); } function useButtonTextColorStyles(a0) { // fn#38869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:4922, offset: 0x010ce6ec, size: 55 bytes, params: 2, frame: 14 const value2 = undefined; const value3 = useProfileThemedButtonStyles(a0); return {color: (value3 == null ? value2 : value3.color) ?? useForegroundColor(a0)}; } function useButtonScaleStyles(a0, a1, a2) { // fn#38870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:6236, offset: 0x010ce723, size: 178 bytes, params: 4, frame: 20 const env0_0 = a0; const env0_1 = a1; const env0_2 = a2; const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle; const useButtonScaleStylesN2 = useButtonScaleStylesN; const object = {width: a1, scaleAmountInPx: a2}; object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring; object.interpolate = ReanimatedRexportModule.interpolate; object.pressed = a0; const ON_PRESS_SPRING = (SpringPresetsModule).ON_PRESS_SPRING; object.ON_PRESS_SPRING = ON_PRESS_SPRING; useButtonScaleStylesN2.__closure = object; useButtonScaleStylesN2.__workletHash = 17256006845494; useButtonScaleStylesN2.__initData = env0_10; return Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [useButtonScaleStylesN2]); function useButtonScaleStylesN() { // fn#38871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:6309, owner: useButtonScaleStyles.n, offset: 0x010ce7d5, size: 208 bytes, params: 1, frame: 22 const r1 = require.get() > 0 ? (require.get() - importDefault) / require.get() : 1; const withSpring = SpringModule.withSpring; const interpolate = ReanimatedRexportModule.interpolate; let value = env0_0.get(); value = Reflect.apply(interpolate, ReanimatedRexportModule, [value, [0, 1], [1, r1]]); const ON_PRESS_SPRING = (SpringPresetsModule).ON_PRESS_SPRING; return {transform: [{scale: Reflect.apply(withSpring, SpringModule, [value, ON_PRESS_SPRING, 'animate-always'])}]}; } } function _fun38874(a0) { // fn#38874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:2157, offset: 0x010ce8b5, size: 1269 bytes, params: 2, frame: 15 var object; var colors; if (a0 === 'primary') { object = {}; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.backgroundInactive = colors.CONTROL_PRIMARY_BACKGROUND_DEFAULT; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.backgroundPressed = colors.CONTROL_PRIMARY_BACKGROUND_ACTIVE; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.borderInactive = colors.CONTROL_PRIMARY_BORDER_DEFAULT; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.borderPressed = colors.CONTROL_PRIMARY_BORDER_ACTIVE; return object; } if (a0 === 'secondary') { object = {}; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.backgroundInactive = colors.CONTROL_SECONDARY_BACKGROUND_DEFAULT; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.backgroundPressed = colors.CONTROL_SECONDARY_BACKGROUND_ACTIVE; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.borderInactive = colors.CONTROL_SECONDARY_BORDER_DEFAULT; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.borderPressed = colors.CONTROL_SECONDARY_BORDER_ACTIVE; return object; } if (a0 === 'tertiary') { object = {}; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.backgroundInactive = colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.backgroundPressed = colors.REDESIGN_BUTTON_TERTIARY_PRESSED_BACKGROUND; object.borderInactive = env0_4; object.borderPressed = env0_4; return object; } if (a0 === 'critical-primary') { object = {}; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.backgroundInactive = colors.CONTROL_CRITICAL_PRIMARY_BACKGROUND_DEFAULT; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.backgroundPressed = colors.CONTROL_CRITICAL_PRIMARY_BACKGROUND_ACTIVE; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.borderInactive = colors.CONTROL_CRITICAL_PRIMARY_BORDER_DEFAULT; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.borderPressed = colors.CONTROL_CRITICAL_PRIMARY_BORDER_ACTIVE; return object; } if (a0 === 'destructive') { object = {}; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.backgroundInactive = colors.CONTROL_CRITICAL_PRIMARY_BACKGROUND_DEFAULT; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.backgroundPressed = colors.CONTROL_CRITICAL_PRIMARY_BACKGROUND_ACTIVE; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.borderInactive = colors.CONTROL_CRITICAL_PRIMARY_BORDER_DEFAULT; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.borderPressed = colors.CONTROL_CRITICAL_PRIMARY_BORDER_ACTIVE; return object; } if (a0 === 'critical-secondary') { object = {}; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.backgroundInactive = colors.CONTROL_CRITICAL_SECONDARY_BACKGROUND_DEFAULT; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.backgroundPressed = colors.CONTROL_CRITICAL_SECONDARY_BACKGROUND_ACTIVE; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.borderInactive = colors.CONTROL_CRITICAL_SECONDARY_BORDER_DEFAULT; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.borderPressed = colors.CONTROL_CRITICAL_SECONDARY_BORDER_ACTIVE; return object; } if (a0 === 'active') { object = {}; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.backgroundInactive = colors.CONTROL_CONNECTED_BACKGROUND_DEFAULT; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.backgroundPressed = colors.CONTROL_CONNECTED_BACKGROUND_ACTIVE; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.borderInactive = colors.CONTROL_CONNECTED_BORDER_DEFAULT; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.borderPressed = colors.CONTROL_CONNECTED_BORDER_ACTIVE; return object; } if (a0 === 'experimental_premium-secondary') { object = {}; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.backgroundInactive = colors.CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.backgroundPressed = colors.CONTROL_OVERLAY_PRIMARY_BACKGROUND_ACTIVE; object.borderInactive = env0_4; object.borderPressed = env0_4; return object; } if (a0 === 'primary-overlay') { object = {}; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.backgroundInactive = colors.CONTROL_OVERLAY_PRIMARY_BACKGROUND_DEFAULT; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.backgroundPressed = colors.CONTROL_OVERLAY_PRIMARY_BACKGROUND_ACTIVE; object.borderInactive = env0_4; object.borderPressed = env0_4; return object; } if (a0 === 'secondary-overlay') { object = {}; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.backgroundInactive = colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_DEFAULT; colors = (importDefault(697) /* metro dependency 697: native */).colors; object.backgroundPressed = colors.CONTROL_OVERLAY_SECONDARY_BACKGROUND_ACTIVE; object.borderInactive = env0_4; object.borderPressed = env0_4; return object; } if (a0 === 'experimental_welcome-secondary') { return {backgroundInactive: env0_5, backgroundPressed: env0_6, borderInactive: env0_4, borderPressed: env0_4}; } if (a0 === 'experimental_premium-primary') { object = {}; object.backgroundInactive = env0_4; object.backgroundPressed = (importDefault(697) /* metro dependency 697: native */).colors.REDESIGN_BUTTON_PREMIUM_PRIMARY_PRESSED_BACKGROUND; object.borderInactive = env0_4; object.borderPressed = env0_4; return object; } if (a0 === 'icon-only') { object = {}; object.backgroundInactive = env0_4; object.backgroundPressed = (importDefault(697) /* metro dependency 697: native */).colors.CONTROL_ICON_ONLY_BACKGROUND_ACTIVE; object.borderInactive = env0_4; object.borderPressed = env0_4; return object; } if (a0 === 'expressive') { return {backgroundInactive: env0_4, backgroundPressed: env0_4, borderInactive: env0_4, borderPressed: env0_4}; } } function useGradientPillStyles(a0) { // fn#38876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:7115, offset: 0x010cedc9, size: 32 bytes, params: 2, frame: 12 const object = {}; object.borderColor = env0_8(a0).borderInactive; return object; } function useButtonPillStyles(a0, a1) { // fn#38877, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:7212, offset: 0x010cede9, size: 151 bytes, params: 3, frame: 20 const env0_0 = a1; const value2 = useProfileThemedButtonStyles(a0); const value3 = env0_8(a0); const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle; const useButtonPillStylesS2 = useButtonPillStylesS; const object = {themedStyles: value2, colors: value3}; object.interpolateColor = ReanimatedRexportModule.interpolateColor; object.pressed = a1; useButtonPillStylesS2.__closure = object; useButtonPillStylesS2.__workletHash = 2383933325137; useButtonPillStylesS2.__initData = env0_9; return Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [useButtonPillStylesS2]); function useButtonPillStylesS() { // fn#38878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:7329, owner: useButtonPillStyles.s, offset: 0x010cee80, size: 235 bytes, params: 1, frame: 22 const value2 = undefined; const r11 = (env0_1 == null ? value2 : env0_1.backgroundColor) ?? [env0_2.backgroundInactive, env0_2.backgroundPressed]; const r5 = (env0_1 == null ? value2 : env0_1.borderColor) ?? [env0_2.borderInactive, env0_2.borderPressed]; const object = {}; object.backgroundColor = ReanimatedRexportModule.interpolateColor(require.get(), [0, 1], r11); object.borderColor = ReanimatedRexportModule.interpolateColor(require.get(), [0, 1], r5); return object; } } function useButtonPressAnimationProps(a0) { // fn#38879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:7851, offset: 0x010cef6b, size: 257 bytes, params: 2, frame: 24 let value = a0; const value2 = a1; const r5 = value2 !== undefined ? value2 : 8; const env0_0 = a2; const env0_1 = a3; const env0_2 = a4; const r3 = value ?? (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(0); const env0_3 = r3; value = require(4017) /* metro dependency 4017: ReanimatedRexport */; value = value.useSharedValue(0); const object = {}; object.onPressIn = env0_3.useCallback(_fun38880, [r3, a3]); object.onPressOut = env0_3.useCallback(_fun38881, [r3, a4]); object.onLayout = env0_3.useCallback(_fun38882, [value, a2]); object.style = useButtonScaleStyles(r3, value, r5); return object; function _fun38880(a0) { // fn#38880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:8008, offset: 0x010cf06c, size: 48 bytes, params: 2, frame: 12 env0_3.set(1); if (importAll != null) { importAll(a0); } } function _fun38881(a0) { // fn#38881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:8070, offset: 0x010cf09c, size: 47 bytes, params: 2, frame: 12 env0_3.set(0); if (env0_2 != null) { env0_2(a0); } } function _fun38882(a0) { // fn#38882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:8130, offset: 0x010cf0cb, size: 62 bytes, params: 2, frame: 13 const binding = env0_4; binding.set(a0.nativeEvent.layout.width); if (importDefault != null) { importDefault(a0); } } } function useIconSizeStyles(a0) { // fn#38883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:8247, offset: 0x010cf109, size: 147 bytes, params: 2, frame: 18 const value = a1; const value2 = a2; const env0_0 = a0; const r6 = value !== undefined ? value : false; const r5 = value2 !== undefined ? value2 : (require(4582) /* metro dependency 4582: ButtonConstantsNative */).BUTTON_DEFAULT_MAX_FONT_SIZE_MULTIPLIER; const value3 = (UseFontScaleModule).useFontScale(); return value3.useMemo(_fun38884, [a0, r6, r5, value3]); function _fun38884() { // fn#38884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4761:8356, offset: 0x010cf19c, size: 364 bytes, params: 1, frame: 19 var r4; var r5; var r1; var moduleValue2; var moduleValue3; var TextStyleSheet; var property; var Math; let value = environment.__proto__; const iconModule = require(4580) /* metro dependency 4580: Icon */; const getIconSize = iconModule.getIconSize; const MEDIUM_BUTTON_ICON_SIZE = (require(4582) /* metro dependency 4582: ButtonConstantsNative */).MEDIUM_BUTTON_ICON_SIZE; const value2 = Reflect.apply(getIconSize, iconModule, [MEDIUM_BUTTON_ICON_SIZE]); const binding = env0_0; if (binding === 'sm') { moduleValue3 = iconModule; r4 = moduleValue3.getIconSize((require(4582) /* metro dependency 4582: ButtonConstantsNative */).SMALL_BUTTON_ICON_SIZE); } else if (binding !== 'lg') { r4 = value2; } else { moduleValue2 = require(4580) /* metro dependency 4580: Icon */; r4 = moduleValue2.getIconSize((require(4582) /* metro dependency 4582: ButtonConstantsNative */).LARGE_BUTTON_ICON_SIZE); } if (env0_1) { if (ReactModule > 1) { TextStyleSheet = (require(4573) /* metro dependency 4573: Text */).TextStyleSheet; value = require(4582) /* metro dependency 4582: ButtonConstantsNative */; property = TextStyleSheet[value.getButtonDefaultTextVariant(env0_0)]; value = require(477) /* metro dependency 477: PlatformUtils */; r5 = value.isAndroid() ? property.fontSize : property.lineHeight; if (r4 == null) { r1 = r4; } else if (r5 == null) { r1 = r4; } else { Math = global.Math; value = Math.min(ReactModule, env0_2); Math = global.Math; value = Math.max(r4, r5 * value); r1 = value; } } else { r1 = r4; } } else { r1 = r4; } return {width: r1, height: r1}; } } } global.__d(_fun38865, 4583, [31, 4501, 3868, 697, 4002, 3860, 4017, 4577, 4581, 4582, 4584, 4580, 4573, 477, 2]) /* metro module 4583, dependencies: [31, 4501, 3868, 697, 4002, 3860, 4017, 4577, 4581, 4582, 4584, 4580, 4573, 477, 2] */;