/* Metro module 9844; source: components_native/common/TabBar.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 697, 5321, 1244, 2] */ import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */ import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */ 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 ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */ import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */ import * as Module05321Module from '../../by-id/module-05321.js'; /* Metro dependency 5321 */ function _fun77151(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:6, offset: 0x01df36f9, size: 356 bytes, params: 8, frame: 22 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ReactNativeModule; const env0_4 = value.View; const env0_5 = value.TouchableWithoutFeedback; const env0_6 = value.FlatList; value = require(4501) /* metro dependency 4501: createStyles */; const createStyles = value.createStyles; const BRAND_600 = (Native).unsafe_rawColors.BRAND_600; const env0_9 = Reflect.apply(createStyles, value, [{innerContainer: {'flexDirection': 'row', 'alignItems': 'stretch'}, tab: {'flexGrow': 1, 'flexBasis': 'auto', 'flexShrink': 0, 'alignItems': 'center', 'justifyContent': 'center', 'marginBottom': 1, 'marginHorizontal': 1, 'padding': 10, 'borderBottomWidth': 2, 'borderBottomColor': 'transparent'}, tabActive: {backgroundColor: 'rgba(0,0,0,0.1)'}, tabSelected: {borderBottomColor: BRAND_600}, container: {flex: 0}}]); (FileImportTrackerModule).fileFinishedImporting('components_native/common/TabBar.tsx'); exports.default = _default_77157; function Tab({children, index, isSelected, tabStyle, tabStyleActive, tabStyleSelected, onSelect}) { // fn#77152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:610, offset: 0x01df385d, size: 351 bytes, params: 2, frame: 26 const styles = useStyles(); const [property, property2] = Module00057(ReactModule.useState(function() { return false; }), 2); return ( {children} ); function _fun77154() { // fn#77154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:789, offset: 0x01df39bc, size: 18 bytes, params: 1, frame: 11 return Module00057(true); } function _fun77155() { // fn#77155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:822, offset: 0x01df39ce, size: 18 bytes, params: 1, frame: 11 return Module00057(false); } } function _default_77157({initialNumTabsToRender, tabs, tabIndexSelected, tabStyle, tabStyleActive, tabStyleSelected, onSelect, containerStyle, hideHorizontalScrollbar, scrollToSelectedIndex}) { // fn#77157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1059, offset: 0x01df39e0, size: 581 bytes, params: 2, frame: 29 const tabStyleSelected2 = tabStyleSelected; hideHorizontalScrollbar = !(hideHorizontalScrollbar === undefined) && hideHorizontalScrollbar; scrollToSelectedIndex = !(scrollToSelectedIndex === undefined) && scrollToSelectedIndex; const styles = useStyles(); const value2 = tabStyleSelected2.useRef(null); const env0_7 = tabStyleSelected2.useRef(tabIndexSelected); tabStyleSelected2.useEffect(_fun77158, [tabIndexSelected]); const value3 = tabStyleSelected2.useCallback(_fun77159, [value2, onSelect]); const value4 = _fun77160(tabIndexSelected); const value5 = tabStyleSelected2.useCallback(function(a0, a1) { return 'tab-' + a1; }, []); const value6 = tabStyleSelected2.useCallback(_fun77166, [tabIndexSelected, tabStyle, tabStyleActive, tabStyleSelected, scrollToSelectedIndex, onSelect, value3]); const value7 = tabStyleSelected2.useMemo(_fun77167, []); const intl = (IndexNativeModule).intl; const string = intl.string; const t1qXlK = (IndexNativeModule).t.t1qXlK; const GestureDetector = (Module05321Module).GestureDetector; return ( ); function _fun77158() { // fn#77158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1301, offset: 0x01df3c25, size: 21 bytes, params: 1, frame: 2 env0_7.current = tabIndexSelected; } function _fun77159(a0) { // fn#77159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1346, offset: 0x01df3c3a, size: 51 bytes, params: 2, frame: 13 onSelect(a0); const current = env0_6.current; if (current != null) { current.scrollToIndex({index: a0}); } } function _fun77160(a0) { // fn#77160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1421, offset: 0x01df3c6d, size: 97 bytes, params: 2, frame: 15 let env0_0 = a0; env1_3.useEffect(function() { var env0_0 = global.setTimeout(_fun77163, 500); return _fun77164; }, [env1_2(env1_3.useState(_fun77161), 1)[0]]); return env0_6; function _fun77161() { // fn#77161, offset: 0x00c36f09, size: 9 bytes, params: 1, frame: 1 return env0_0; } function _fun77162() { // fn#77162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1483, offset: 0x01df3cce, size: 44 bytes, params: 1, frame: 14 const env0_0 = global.setTimeout(_fun77163, 500); return _fun77164; function _fun77163() { // fn#77163, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1506, offset: 0x01df3cfa, size: 71 bytes, params: 1, frame: 12 let current = env2_7.current; if (current === env1_1) { current = env2_6.current; if (current != null) { current.scrollToIndex({index: env1_1, viewPosition: 1}); } } } function _fun77164() { // fn#77164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1610, offset: 0x00e59c84, size: 24 bytes, params: 1, frame: 11 global.clearTimeout(env0_0); } } } function _fun77166({item, index}) { // fn#77166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1703, offset: 0x01df3d5e, size: 109 bytes, params: 2, frame: 16 return ( {item} ); } function _fun77167() { // fn#77167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10030:1861, offset: 0x01df3dcb, size: 56 bytes, params: 1, frame: 11 const value = environment.__proto__; const Gesture = (Module05321Module).Gesture; return Gesture.Native().disallowInterruption(true); } } } global.__d(_fun77151, 9844, [57, 31, 27, 661, 33, 4501, 697, 5321, 1244, 2]) /* metro module 9844, dependencies: [57, 31, 27, 661, 33, 4501, 697, 5321, 1244, 2] */;