130 lines
6.9 KiB
TypeScript
130 lines
6.9 KiB
TypeScript
/* 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] */
|
|
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
|
|
var object2;
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
|
const env0_4 = importAll(31) /* metro dependency 31 */;
|
|
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
|
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
|
|
const env0_7 = (require(5106) /* metro dependency 5106: GuildOnboardingPromptsConstants */).GuildOnboardingTab;
|
|
let value = require(33) /* metro dependency 33 */;
|
|
const env0_8 = value.jsx;
|
|
const env0_9 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object2 = {};
|
|
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
|
object2.screen = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW};
|
|
const object4 = {};
|
|
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
|
object4.paddingHorizontal = PX_12;
|
|
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object4.paddingTop = PX_16;
|
|
object2.tabBar = object4;
|
|
const env0_10 = Reflect.apply(createStyles, value, [object2]);
|
|
(require(2) /* metro dependency 2 */).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 object2;
|
|
var r5;
|
|
var value;
|
|
const styles = useStyles();
|
|
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
|
|
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 segmentedControlStateNativeModule = require(8853) /* metro dependency 8853: SegmentedControlStateNative */;
|
|
const useSegmentedControlState = segmentedControlStateNativeModule.useSegmentedControlState;
|
|
object2 = {pageWidth: 0, defaultIndex: property, onSetActiveIndex: property2};
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
let string = intl.string;
|
|
const F1VixV = (require(1244) /* metro dependency 1244: indexNative */).t.F1VixV;
|
|
const items3 = [Reflect.apply(string, intl, [F1VixV])];
|
|
string = intl.string;
|
|
const MWmtj8 = (require(1244) /* metro dependency 1244: indexNative */).t.MWmtj8;
|
|
items3[1] = Reflect.apply(string, intl, [MWmtj8]);
|
|
object2.items = items3.map(function(a0) {
|
|
return {id: a0, label: a0, page: null};
|
|
});
|
|
const value7 = Reflect.apply(useSegmentedControlState, segmentedControlStateNativeModule, [object2]);
|
|
value7.useEffect(_fun86918, [value2, property, value7]);
|
|
const items2 = [value2 ? <View style={styles.tabBar}>{((SegmentedControl) => <SegmentedControl state={value7} />)((require(9221) /* metro dependency 9221: SegmentedControlNative */).SegmentedControl)}</View> : null];
|
|
const CUSTOMIZE = GuildOnboardingTab.CUSTOMIZE;
|
|
if (property === CUSTOMIZE) {
|
|
value = importDefault(11351) /* metro dependency 11351: CustomizeCommunity */;
|
|
value = ((Component) => <Component setTab={property2} guildId={guildId} />)(value);
|
|
r5 = value;
|
|
} else {
|
|
value = importDefault(11357) /* metro dependency 11357: ChannelBrowser */;
|
|
value = ((Component) => <Component guildId={guildId} />)(value);
|
|
r5 = value;
|
|
}
|
|
items2[1] = r5;
|
|
return (
|
|
<View style={styles.screen}>
|
|
{items2}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
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 ModalStackNavigator = importDefault(9883) /* metro dependency 9883: ModalStackNavigator */;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const string = intl.string;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
return (
|
|
<ModalStackNavigator
|
|
screenKey="channelAndRolesModal"
|
|
title={value2 ? Reflect.apply(string, intl, [t.h9mGOP]) : Reflect.apply(string, intl, [t.et6wav])}
|
|
render={render_86921}
|
|
/>
|
|
);
|
|
}
|
|
|
|
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 = env0_3;
|
|
value4 = environment.__proto__;
|
|
BROWSE = GuildOnboardingTab.BROWSE;
|
|
binding(BROWSE);
|
|
binding = env0_4;
|
|
setActiveIndex = binding.setActiveIndex;
|
|
BROWSE = GuildOnboardingTab.BROWSE;
|
|
Reflect.apply(setActiveIndex, binding, [BROWSE, false]);
|
|
}
|
|
}
|
|
|
|
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 <ChannelsAndRolesScreen guildId={guildId} defaultTab={defaultTab} />;
|
|
}
|
|
|