/* Metro module 5299; source: unknown; dependencies: [57, 31, 27, 33, 1485, 5288, 5300, 5289, 5304] */ import Module00057 from './module-00057.js'; /* Metro dependency 57 */ import Module05304 from './module-05304.jsx'; /* Metro dependency 5304 */ import * as ReactNativeModule from './module-00027-ReactNative.js'; /* Metro dependency 27 */ import * as JsxRuntimeModule from './module-00033-JsxRuntime.js'; /* Metro dependency 33 */ import * as Module01485Module from './module-01485.js'; /* Metro dependency 1485 */ function _fun47003(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#47003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5477:6, offset: 0x011b5a9d, size: 539 bytes, params: 8, frame: 22 const env0_0 = require; let Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const value = 1; const env0_4 = importAll(dependencyMap[value]); const I18nManager = ReactNativeModule.I18nManager; const Platform = ReactNativeModule.Platform; const StyleSheet = ReactNativeModule.StyleSheet; object = {'borderless': true, 'foreground': null, 'radius': 20}; const Version = Platform.Version; object.foreground = Version >= 23; const create = StyleSheet.create; object = {}; Object = global.Object; object.container = Object.assign({'alignItems': 'center', 'flexDirection': 'row', minWidth: StyleSheet.hairlineWidth}, {'marginVertical': 3, 'marginHorizontal': 11}); object.disabled = {opacity: 0.5}; object.label = {'fontSize': 17, 'letterSpacing': 0.35}; object.labelWrapper = {'flexDirection': 'row', 'alignItems': 'flex-start'}; let getConstants = I18nManager.getConstants; object.icon = {'height': 24, 'width': 24, 'margin': 3, 'resizeMode': 'contain', transform: [{scaleX: Reflect.apply(getConstants, I18nManager, []).isRTL ? -1 : value}]}; object.iconWithLabel = {}; object.iconMaskContainer = {'flex': 1, 'flexDirection': 'row', 'justifyContent': 'center'}; object.iconMaskFillerRect = {'flex': 1, 'backgroundColor': '#000'}; getConstants = I18nManager.getConstants; object.iconMask = {'height': 21, 'width': 13, 'marginLeft': -14.5, 'marginVertical': 12, 'alignSelf': 'center', 'resizeMode': 'contain', transform: [{scaleX: Reflect.apply(getConstants, I18nManager, []).isRTL ? -1 : value}]}; const env0_11 = Reflect.apply(create, StyleSheet, [object]); exports.default = HeaderBackButton; function HeaderBackButton({disabled, allowFontScaling, backImage, label, labelStyle, labelVisible, onLabelLayout, onPress, pressColor, pressOpacity, screenLayout, tintColor, titleLayout, truncatedLabel, accessibilityLabel, testID, style}) { // fn#47004, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5477:961, offset: 0x011b5cb8, size: 678 bytes, params: 2, frame: 28 var r9; var items2; var Boolean; const r18 = labelVisible !== undefined && labelVisible; const env0_3 = r18; const value3 = 'Back'; const env0_8 = truncatedLabel === undefined ? value3 : truncatedLabel; const r12 = accessibilityLabel !== undefined ? accessibilityLabel : label ? value3 === label ? 'Go back' : '' + label + ', back' : 'Go back'; const useTheme = Module01485Module.useTheme; const colors = Reflect.apply(useTheme, Module01485Module, []).colors; const [env0_9, env0_10] = env0_3(onLabelLayout.useState(undefined), 2); const r11 = tintColor !== undefined ? tintColor : colors.text; const env0_11 = r11; const defaultImport = Module05304; const defaultImportProps2 = {'disabled': null, 'accessible': true, 'accessibilityRole': 'button', disabled: disabled, accessibilityLabel: r12, testID: testID, onPress: disabled ? undefined : HeaderBackButtonHandlePress, pressColor: pressColor, pressOpacity: pressOpacity, android_ripple: env0_10}; disabled = disabled && env0_11.disabled; defaultImportProps2.style = [env0_11.container, disabled, style]; defaultImportProps2.hitSlop = {'top': 16, 'right': 16, 'bottom': 16, 'left': 16}; const Fragment = onLabelLayout.Fragment; if (backImage) { r9 = backImage({tintColor: r11}); } else { items2 = [env0_11.icon]; Boolean = global.Boolean; items2[1] = Boolean(r18) && env0_11.iconWithLabel; Boolean = global.Boolean; items2[2] = Boolean(r11) && ({tintColor: r11}); r9 = ( ); } return ((Component) => {[r9, renderLabel()]})(defaultImport); function handleLabelLayout(a0) { // fn#47005, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5477:1442, owner: HeaderBackButton.handleLabelLayout, offset: 0x011b5f5e, size: 78 bytes, params: 2, frame: 12 if (onLabelLayout != null) { onLabelLayout(a0); } env0_10(a0.nativeEvent.layout.x + a0.nativeEvent.layout.width); } function HeaderBackButtonHandlePress() { // fn#47006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5477:1657, owner: HeaderBackButton.handlePress, offset: 0x011b5fac, size: 31 bytes, params: 1, frame: 12 return onPress && global.requestAnimationFrame(onPress); } function renderLabel() { // fn#47007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5477:2036, owner: HeaderBackButton.renderLabel, offset: 0x011b5fcb, size: 338 bytes, params: 1, frame: 22 var r1; var r0; var screenLayoutBinding; var value5; var value6; var value7; const labelBinding = label; if (labelBinding) { r1 = env0_9 && titleLayout; r1 = r1 && screenLayout; r1 = r1 && (screenLayout.width - titleLayout.width) / 2 < env0_9 + 26; r0 = r1; } else { r0 = !labelBinding; } const r7 = r0 ? env0_8 : label; if (env0_3) { value5 = undefined; if (value5 === r7) { return null; } value6 = environment.__proto__; screenLayoutBinding = screenLayout; value7 = null; return ( {r7} ); } return null; } } } global.__d(_fun47003, 5299, [57, 31, 27, 33, 1485, 5288, 5300, 5289, 5304]) /* metro module 5299, dependencies: [57, 31, 27, 33, 1485, 5288, 5300, 5289, 5304] */;