/* Metro module 5430; source: unknown; dependencies: [29, 57, 31, 27, 33, 5431, 5403] */ import ObjectWithoutProperties from './module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */ import Module00057 from './module-00057.js'; /* Metro dependency 57 */ import * as ReactNativeModule from './module-00027-ReactNative.js'; /* Metro dependency 27 */ import * as ReactModule from './module-00031-React.js'; /* Metro dependency 31 */ import * as JsxRuntimeModule from './module-00033-JsxRuntime.js'; /* Metro dependency 33 */ import * as Module05403Module from './module-05403.js'; /* Metro dependency 5403 */ function _fun47767(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#47767, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5608:6, offset: 0x011cc6cf, size: 186 bytes, params: 8, frame: 19 const env0_0 = require; const env0_3 = ['progress', 'layout', 'modal', 'onGoBack', 'headerTitle', 'headerLeft', 'headerRight', 'headerBackImage', 'headerBackTitle', 'headerBackTitleVisible', 'headerTruncatedBackTitle', 'headerBackAccessibilityLabel', 'headerBackTestID', 'headerBackAllowFontScaling', 'headerBackTitleStyle', 'headerTitleContainerStyle', 'headerLeftContainerStyle', 'headerRightContainerStyle', 'headerBackgroundContainerStyle', 'headerStyle', 'headerStatusBarHeight', 'styleInterpolator']; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); ReactNativeModule.Platform; exports.default = HeaderSegment; function HeaderSegment(a0) { // fn#47768, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5608:643, offset: 0x011cc789, size: 735 bytes, params: 2, frame: 42 let useState = ReactModule.useState; const value2 = undefined; const value3 = Reflect.apply(useState, ReactModule, [value2]); const value4 = Module00057(value3, 2); const property = value4[0]; const env0_1 = value4[1]; useState = ReactModule.useState; const value5 = Module00057(Reflect.apply(useState, ReactModule, [value2]), 2); const property2 = value5[0]; const env0_3 = value5[1]; const value6 = (importDefault(5431) /* metro dependency 5431 */)(function(a0, a1, a2, a3, a4, a5, a6) { var value = a3; return a0({current: {progress: a2}, next: value && ({progress: value}), layouts: {header: {height: a6, width: a1.width}, screen: a1, title: a4, leftLabel: a5}}); }); const progress = a0.progress; const layout = a0.layout; const modal = a0.modal; const onGoBack = a0.onGoBack; const headerTitle = a0.headerTitle; const headerLeft = a0.headerLeft; let r9 = value2 !== headerLeft ? headerLeft : onGoBack ? _fun47773 : value2; const headerRight = a0.headerRight; const env0_11 = a0.headerBackImage; const headerBackTitle = a0.headerBackTitle; const headerBackTitleVisible = a0.headerBackTitleVisible; const r18 = value2 !== headerBackTitleVisible && headerBackTitleVisible; const env0_13 = a0.headerTruncatedBackTitle; const env0_14 = a0.headerBackAccessibilityLabel; const env0_15 = a0.headerBackTestID; const env0_16 = a0.headerBackAllowFontScaling; const env0_17 = a0.headerBackTitleStyle; const headerTitleContainerStyle = a0.headerTitleContainerStyle; const headerLeftContainerStyle = a0.headerLeftContainerStyle; const headerRightContainerStyle = a0.headerRightContainerStyle; const headerBackgroundContainerStyle = a0.headerBackgroundContainerStyle; const headerStyle = a0.headerStyle; const headerStatusBarHeight = a0.headerStatusBarHeight; const styleInterpolator = a0.styleInterpolator; const value8 = ObjectWithoutProperties(a0, env0_3); const defaultHeaderHeight = (Module05403Module).getDefaultHeaderHeight(layout, modal, headerStatusBarHeight); const height = StyleSheet.flatten(headerStyle || ({})).height; const r24 = value2 !== height ? height : defaultHeaderHeight; const value10 = value6(styleInterpolator, layout, progress.current, progress.next, property2, headerBackTitle ? property : value2, typeof r24 !== 'number' ? defaultHeaderHeight : r24); const titleStyle = value10.titleStyle; const leftButtonStyle = value10.leftButtonStyle; const env0_18 = value10.leftLabelStyle; const rightButtonStyle = value10.rightButtonStyle; const backgroundStyle = value10.backgroundStyle; const r19 = r9 ? _fun47774 : value2; r9 = headerRight ? function(a0) { var headerRightBinding = headerRight; var Object = global.Object; var object = {}; var Boolean = global.Boolean; object.canGoBack = Boolean(onGoBack); return headerRightBinding(Object.assign({}, a0, object)); } : value2; const r20 = typeof headerTitle !== 'function' ? _fun47776 : _fun47777; const Header = (Module05403Module).Header; let Object = global.Object; return (
); function handleTitleLayout({nativeEvent}) { // fn#47769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5608:763, owner: HeaderSegment.handleTitleLayout, offset: 0x011cca68, size: 56 bytes, params: 2, frame: 11 const layout = nativeEvent.layout; const env0_0 = layout.height; const env0_1 = layout.width; env0_3(function(a0) { var value = a0; return value ? height !== value.height ? {height: height, width: width} : width === value.width ? value : {height: height, width: width} : {height: height, width: width}; }); } function handleLeftLabelLayout({nativeEvent}) { // fn#47771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5608:919, owner: HeaderSegment.handleLeftLabelLayout, offset: 0x011ccadd, size: 92 bytes, params: 2, frame: 13 const {height, width} = nativeEvent.layout; if (!(env0_0 && height === env0_0.height && width === env0_0.width)) { env0_1({height: height, width: width}); } } function _fun47773(a0) { // fn#47773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5608:1310, offset: 0x011ccba0, size: 67 bytes, params: 2, frame: 16 const HeaderBackButton = (Module05403Module).HeaderBackButton; const Object = global.Object; return ; } function _fun47774(a0) { // fn#47774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5608:2071, offset: 0x011ccbe3, size: 171 bytes, params: 2, frame: 19 const binding = env0_9; const Object = global.Object; const assign = Object.assign; const object = {}; object.backImage = headerBackImage; object.accessibilityLabel = headerBackAccessibilityLabel; object.testID = headerBackTestID; object.allowFontScaling = headerBackAllowFontScaling; const onGoBackBinding = onGoBack; object.onPress = onGoBackBinding; object.label = headerBackTitle; object.truncatedLabel = headerTruncatedBackTitle; object.labelStyle = [leftLabelStyle, headerBackTitleStyle]; object.onLabelLayout = handleLeftLabelLayout; object.screenLayout = layout; object.titleLayout = env0_2; const Boolean = global.Boolean; object.canGoBack = Boolean(onGoBackBinding); return binding(Reflect.apply(assign, Object, [{}, a0, object])); } function _fun47776(a0) { // fn#47776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5608:2405, offset: 0x011ccccd, size: 82 bytes, params: 2, frame: 18 const HeaderTitle = (Module05403Module).HeaderTitle; const Object = global.Object; return ; } function _fun47777(a0) { // fn#47777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5608:2481, offset: 0x011ccd1f, size: 52 bytes, params: 2, frame: 16 const headerTitleBinding = headerTitle; const Object = global.Object; return headerTitleBinding(Object.assign({}, a0, {onLayout: handleTitleLayout})); } } } global.__d(_fun47767, 5430, [29, 57, 31, 27, 33, 5431, 5403]) /* metro module 5430, dependencies: [29, 57, 31, 27, 33, 5431, 5403] */;