170 lines
11 KiB
TypeScript
170 lines
11 KiB
TypeScript
/* Metro module 14995; source: modules/guild_settings/native/GuildSettingsModalMembersWithTabs.tsx; dependencies: [31, 27, 1867, 33, 4501, 697, 1478, 14596, 1244, 14996, 14997, 15003, 3972, 1484, 8853, 8811, 14998, 5277, 9139, 8859, 8859, 8861, 2] */
|
|
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import UseWindowDimensionsNative from '../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
|
|
import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
|
|
import Module09139 from '../../../by-id/module-09139.js'; /* Metro dependency 9139 */
|
|
import GuildSettingsModalMemberApplications from './GuildSettingsModalMemberApplications.tsx'; /* Metro dependency 15003 */
|
|
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 UseNavigationNativeModule from '../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
|
|
import * as MemberVerificationTypesModule from '../../guild_member_verification/MemberVerificationTypes.tsx'; /* Metro dependency 3972 */
|
|
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
import * as HeaderActionButtonNativeModule from '../../../design/components/Navigator/native/HeaderActionButton.native.tsx'; /* Metro dependency 5277 */
|
|
import * as ContextMenuNativeModule from '../../../design/components/ContextMenu/native/ContextMenu.native.tsx'; /* Metro dependency 8811 */
|
|
import * as TabsNativeModule from '../../../design/components/Tabs/native/Tabs.native.tsx'; /* Metro dependency 8859 */
|
|
import * as SegmentedControlPagesNativeModule from '../../../design/components/SegmentedControl/native/SegmentedControlPages.native.tsx'; /* Metro dependency 8861 */
|
|
import * as UseSubmittedGuildJoinRequestTotalModule from '../../guild_member_verification/hooks/useSubmittedGuildJoinRequestTotal.tsx'; /* Metro dependency 14596 */
|
|
import * as MemberSafetyPageTypesModule from '../../guild_mod_dash_member_safety/MemberSafetyPageTypes.tsx'; /* Metro dependency 14996 */
|
|
|
|
function _fun113329(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#113329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15192:6, offset: 0x023f46f7, size: 292 bytes, params: 8, frame: 23
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactModule;
|
|
const createStyles = CreateStylesModule.createStyles;
|
|
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
|
|
const env0_8 = Reflect.apply(createStyles, CreateStylesModule, [{container: {flex: 1,
|
|
backgroundColor: BACKGROUND_BASE_LOWER}, content: {flex: 1}, tabContainer: {'marginTop': 12, 'minHeight': 32}}]);
|
|
value = value.memo(_fun113330);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/guild_settings/native/GuildSettingsModalMembersWithTabs.tsx');
|
|
exports.default = value;
|
|
function _fun113330({guildId}) { // fn#113330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15192:324, offset: 0x023f481b, size: 445 bytes, params: 2, frame: 23
|
|
const width = (UseWindowDimensionsNative)().width;
|
|
const useSubmittedGuildJoinRequestTotal = UseSubmittedGuildJoinRequestTotalModule.useSubmittedGuildJoinRequestTotal;
|
|
const r8 = Reflect.apply(useSubmittedGuildJoinRequestTotal, UseSubmittedGuildJoinRequestTotalModule,
|
|
[{guildId: guildId}]) ?? 0;
|
|
const styles = useStyles();
|
|
const value4 = env0_3.useMemo(_fun113331, [guildId, r8]);
|
|
const env0_2 = (UseNavigationNativeModule).useNavigation();
|
|
const value6 = (require(8853) /* metro dependency 8853: SegmentedControlStateNative */).useSegmentedControlState({pageWidth: width,
|
|
items: value4, defaultIndex: r8 > 0 ? 1 : 0, onSetActiveIndex: onSetActiveIndex_113332});
|
|
const value7 = env0_3.useCallback(_fun113336, []);
|
|
const Tabs = (TabsNativeModule).Tabs;
|
|
const view = (
|
|
<View style={styles.tabContainer}>
|
|
<Tabs
|
|
state={value6}
|
|
grow
|
|
formatCount={value7}
|
|
/>
|
|
</View>
|
|
);
|
|
const SegmentedControlPages = (SegmentedControlPagesNativeModule).SegmentedControlPages;
|
|
return (
|
|
<View style={styles.container}>
|
|
{view}
|
|
<View style={styles.content}>
|
|
<SegmentedControlPages state={value6} />
|
|
</View>
|
|
</View>
|
|
);
|
|
function _fun113331() { // fn#113331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15192:460, offset: 0x023f49d8, size: 594 bytes, params: 1, frame: 24
|
|
let object = {};
|
|
let value = environment.__proto__;
|
|
const value2 = undefined;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const string = intl.string;
|
|
const NOOm1Z = (require(1244) /* metro dependency 1244: indexNative */).t.NOOm1Z;
|
|
object.label = Reflect.apply(string, intl, [NOOm1Z]);
|
|
const MemberSafetyPageTab = (MemberSafetyPageTypesModule).MemberSafetyPageTab;
|
|
const ALL_MEMBERS = MemberSafetyPageTab.ALL_MEMBERS;
|
|
object.id = ALL_MEMBERS;
|
|
object.page = ((Component) => <Component guildId={guildId} />)(importDefault(14997) /* metro dependency 14997: GuildSettingsModalMembers */);
|
|
const items2 = [object];
|
|
object = {};
|
|
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['4eQVBO']);
|
|
const PENDING = MemberSafetyPageTab.PENDING;
|
|
object.id = PENDING;
|
|
object.count = env0_1 > 0 ? env0_1 : value2;
|
|
guildIdBinding = guildId;
|
|
const GuildJoinRequestApplicationStatuses = (MemberVerificationTypesModule).GuildJoinRequestApplicationStatuses;
|
|
const SUBMITTED = GuildJoinRequestApplicationStatuses.SUBMITTED;
|
|
object.page = <GuildSettingsModalMemberApplications guildId={guildIdBinding} applicationStatus={SUBMITTED} />;
|
|
items2[1] = object;
|
|
object = {};
|
|
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bSZkla);
|
|
let REJECTED = MemberSafetyPageTab.REJECTED;
|
|
object.id = REJECTED;
|
|
value = GuildSettingsModalMemberApplications;
|
|
REJECTED = GuildJoinRequestApplicationStatuses.REJECTED;
|
|
object.page = ((Component) => <Component guildId={guildIdBinding} applicationStatus={REJECTED} />)(value);
|
|
items2[2] = object;
|
|
object = {};
|
|
object.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.aURgY2);
|
|
let APPROVED = MemberSafetyPageTab.APPROVED;
|
|
object.id = APPROVED;
|
|
value = GuildSettingsModalMemberApplications;
|
|
APPROVED = GuildJoinRequestApplicationStatuses.APPROVED;
|
|
object.page = ((Component) => <Component guildId={guildIdBinding} applicationStatus={APPROVED} />)(value);
|
|
items2[3] = object;
|
|
return items2;
|
|
}
|
|
|
|
function onSetActiveIndex_113332(a0) { // fn#113332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15192:1297, offset: 0x023f4c2a, size: 107 bytes, params: 2, frame: 13
|
|
var environment;
|
|
var value;
|
|
var binding;
|
|
var guildStoreBinding;
|
|
if (a0 === 0) {
|
|
value = environment.__proto__;
|
|
guildStoreBinding = GuildStore;
|
|
var env0_0 = guildStoreBinding.getGuild(guildId);
|
|
binding = env0_2;
|
|
binding.setOptions({headerRight: headerRight_113333});
|
|
} else {
|
|
env0_2.setOptions({headerRight: function() {
|
|
return null;
|
|
}});
|
|
}
|
|
function onSetActiveIndex_113332HeaderRight() { // fn#113333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15192:1357, owner: onSetActiveIndex_113332.headerRight, offset: 0x023f4c95, size: 123 bytes, params: 1, frame: 18
|
|
var environment;
|
|
var r4;
|
|
let value = environment.__proto__.__proto__;
|
|
const ContextMenu = (ContextMenuNativeModule).ContextMenu;
|
|
if (env0_0 != null) {
|
|
value = require(14998) /* metro dependency 14998: showMembersManagementActionSheet */;
|
|
value = value.getMembersManagementActions({guild: env0_0});
|
|
r4 = value;
|
|
} else {
|
|
r4 = [];
|
|
}
|
|
return (
|
|
<ContextMenu items={r4}>
|
|
{children_113334}
|
|
</ContextMenu>
|
|
);
|
|
function headerRightChildren(a0) { // fn#113334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15192:1459, owner: onSetActiveIndex_113332.headerRight.children, offset: 0x023f4d10, size: 158 bytes, params: 2, frame: 21
|
|
const ref = a0.ref;
|
|
const value = Object.create(null);
|
|
value.ref = 0;
|
|
const value2 = copyDataProperties({}, a0, value, undefined);
|
|
const HeaderActionButton = (HeaderActionButtonNativeModule).HeaderActionButton;
|
|
const headerActionButtonProps = {source: Module09139};
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
headerActionButtonProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ogxXGq);
|
|
headerActionButtonProps.ref = ref;
|
|
copyDataProperties(headerActionButtonProps, value2, value);
|
|
return <HeaderActionButton {...headerActionButtonProps} />;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function _fun113336(a0) { // fn#113336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15192:1658, offset: 0x023f4dae, size: 70 bytes, params: 2, frame: 13
|
|
let value = environment.__proto__;
|
|
value = require(8859) /* metro dependency 8859: TabsNative */;
|
|
value = value.defaultCountFormatter(a0);
|
|
return '(' + value + ')';
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun113329, 14995, [31, 27, 1867, 33, 4501, 697, 1478, 14596, 1244, 14996, 14997, 15003, 3972, 1484,
|
|
8853, 8811, 14998, 5277, 9139, 8859, 8859, 8861,
|
|
2]) /* metro module 14995, dependencies: [31, 27, 1867, 33, 4501, 697, 1478, 14596, 1244, 14996, 14997, 15003, 3972, 1484, 8853, 8811, 14998, 5277, 9139, 8859, 8859, 8861, 2] */;
|