/* Metro module 11350; source: modules/guild_onboarding/native/ChannelsAndRolesModal.tsx; dependencies: [57, 31, 27, 1867, 5106, 33, 4501, 697, 632, 6941, 8853, 1244, 9221, 11351, 11357, 9883, 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 GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */ import ModalStackNavigator from '../../main_tabs_v2/native/utils/ModalStackNavigator.tsx'; /* Metro dependency 9883 */ 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 UseStateFromStoresModule from '../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */ import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */ import * as GuildOnboardingPromptsConstantsModule from '../GuildOnboardingPromptsConstants.tsx'; /* Metro dependency 5106 */ import * as SegmentedControlStateNativeModule from '../../../design/components/SegmentedControl/native/SegmentedControlState.native.tsx'; /* Metro dependency 8853 */ function _fun86914(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#86914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11536:6, offset: 0x01fa75c5, size: 358 bytes, params: 8, frame: 22 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = JsxRuntimeModule; const env0_8 = value.jsx; const env0_9 = value.jsxs; value = require(4501) /* metro dependency 4501: createStyles */; const createStyles = value.createStyles; object = {}; const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW; object.screen = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW}; const object3 = {}; const PX_12 = (Native).space.PX_12; object3.paddingHorizontal = PX_12; const PX_16 = (Native).space.PX_16; object3.paddingTop = PX_16; object.tabBar = object3; const env0_10 = Reflect.apply(createStyles, value, [object]); (FileImportTrackerModule).fileFinishedImporting('modules/guild_onboarding/native/ChannelsAndRolesModal.tsx'); exports.default = ChannelsAndRolesModal; function ChannelsAndRolesScreen({guildId, defaultTab}) { // fn#86915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11536:368, offset: 0x01fa772b, size: 631 bytes, params: 2, frame: 27 var r5; var value; const styles = useStyles(); const useStateFromStores = UseStateFromStoresModule.useStateFromStores; const value2 = (importDefault(6941) /* metro dependency 6941: useGuildOnboardingAvailable */)(Reflect.apply(useStateFromStores, UseStateFromStoresModule, [[GuildStore], function() { return GuildStore.getGuild(guildId); }])); const binding = undefined; const useState = binding.useState; const value5 = undefined(Reflect.apply(useState, binding, [defaultTab ?? (value2 ? GuildOnboardingTab.CUSTOMIZE : GuildOnboardingTab.BROWSE)]), 2); const property = value5[0]; const property2 = value5[1]; const useSegmentedControlState = SegmentedControlStateNativeModule.useSegmentedControlState; object = {pageWidth: 0, defaultIndex: property, onSetActiveIndex: property2}; const intl = (IndexNativeModule).intl; let string = intl.string; const F1VixV = (IndexNativeModule).t.F1VixV; const items3 = [Reflect.apply(string, intl, [F1VixV])]; string = intl.string; const MWmtj8 = (IndexNativeModule).t.MWmtj8; items3[1] = Reflect.apply(string, intl, [MWmtj8]); object.items = items3.map(function(a0) { return {id: a0, label: a0, page: null}; }); const value7 = Reflect.apply(useSegmentedControlState, SegmentedControlStateNativeModule, [object]); value7.useEffect(_fun86918, [value2, property, value7]); const items2 = [ value2 ? ( {((SegmentedControl) => )((require(9221) /* metro dependency 9221: SegmentedControlNative */).SegmentedControl)} ) : null, ]; const CUSTOMIZE = GuildOnboardingTab.CUSTOMIZE; if (property === CUSTOMIZE) { value = importDefault(11351) /* metro dependency 11351: CustomizeCommunity */; value = ((Component) => )(value); r5 = value; } else { value = importDefault(11357) /* metro dependency 11357: ChannelBrowser */; value = ((Component) => )(value); r5 = value; } items2[1] = r5; return ( {items2} ); function _fun86918() { // fn#86918, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11536:803, offset: 0x01fa79a2, size: 90 bytes, params: 1, frame: 14 var r0; var value2; var value4; var BROWSE; var setActiveIndex; let binding = env0_1; if (binding) { r0 = binding; } else { binding = env0_2; value2 = environment.__proto__; r0 = binding !== GuildOnboardingTab.CUSTOMIZE; } if (!r0) { binding = Module00057; value4 = environment.__proto__; BROWSE = GuildOnboardingTab.BROWSE; binding(BROWSE); binding = ReactModule; setActiveIndex = binding.setActiveIndex; BROWSE = GuildOnboardingTab.BROWSE; Reflect.apply(setActiveIndex, binding, [BROWSE, false]); } } } function ChannelsAndRolesModal({guildId, defaultTab}) { // fn#86919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11536:1168, offset: 0x01fa79fc, size: 224 bytes, params: 2, frame: 20 const value2 = (importDefault(6941) /* metro dependency 6941: useGuildOnboardingAvailable */)((require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([GuildStore], function() { return GuildStore.getGuild(guildId); })); const intl = (IndexNativeModule).intl; const string = intl.string; const t = (IndexNativeModule).t; return ( ); function ChannelsAndRolesModalRender() { // fn#86921, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11536:1443, owner: ChannelsAndRolesModal.render, offset: 0x01fa7adc, size: 43 bytes, params: 1, frame: 14 return ; } } } global.__d(_fun86914, 11350, [57, 31, 27, 1867, 5106, 33, 4501, 697, 632, 6941, 8853, 1244, 9221, 11351, 11357, 9883, 2]) /* metro module 11350, dependencies: [57, 31, 27, 1867, 5106, 33, 4501, 697, 632, 6941, 8853, 1244, 9221, 11351, 11357, 9883, 2] */;