This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,125 @@
// Metro module 16516 (f16517).
import { useRef, useCallback } from "react";
import { Image as Image2, View } from "react-native";
import GuildSettingsStore from "../../../../guild_settings/GuildSettingsStore";
import ChannelStore from "../../../../../stores/ChannelStore";
import GuildChannelStore, { GUILD_SELECTABLE_CHANNELS_KEY } from "../../../../../stores/GuildChannelStore";
import RelationshipStore from "../../../../../stores/RelationshipStore";
import UserStore from "../../../../../stores/UserStore";
import { CREATE_NEW_CHANNEL_VALUE } from "../../../PublicGuildsConstants";
import { ChannelTypes } from "../../../../../Constants";
import { useToken } from "../../../../../design/tokens/native/useToken";
import Module712 from "../../../../../_bundle/Module712";
import { useEnableCommunitySharedStyles } from "./EnableCommunitySharedStyles";
import { useStateFromStoresObject } from "../../../../../_bundle/Module589";
import useChannelName, { computeChannelName } from "../../../../channel/useChannelName";
import { intl, t } from "../../../../../intl/index.native";
import useEnableCommunityModalIcons from "./useEnableCommunityModalIcons";
import ActionSheetActionCreators from "../../../../action_sheet/native/ActionSheetActionCreators";
import GuildSettingsActionCreators from "../../../../guild_settings/GuildSettingsActionCreators";
import { EnableCommunityModalScreen, EnableCommunityModalSteps } from "./EnableCommunitySharedNavigation";
import { Text, Heading } from "../../../../../design/components/Text/native/Text";
import { Stack } from "../../../../../design/components/Stack/native/Stack.native";
import { TableRowGroup } from "../../../../../design/components/TableRow/native/TableRowGroup.native";
import { TableRow } from "../../../../../design/components/TableRow/native/TableRow.native";
export default function ChannelSetupScreen() {
let rulesChannel, publicUpdatesChannel, callback;
const ref = useRef(null);
const token = useToken(Module712.modules.mobile.TABLE_ROW_PADDING);
const styles = useEnableCommunitySharedStyles();
const guild = useStateFromStoresObject([GuildSettingsStore], () => GuildSettingsStore.getProps()).guild;
const stateFromStoresObject = useStateFromStoresObject([ChannelStore], () => ({
rulesChannel: ChannelStore.getChannel(guild?.rulesChannelId),
publicUpdatesChannel: ChannelStore.getChannel(guild?.publicUpdatesChannelId)
}));
rulesChannel = stateFromStoresObject.rulesChannel;
publicUpdatesChannel = stateFromStoresObject.publicUpdatesChannel;
let text2 = useChannelName(rulesChannel, true);
if (text2 == null) {
text2 = intl.string(t.Cla0re);
}
let text = useChannelName(publicUpdatesChannel, true);
if (text == null) {
text = intl.string(t.Cla0re);
}
const enableCommunityModalIcons = useEnableCommunityModalIcons();
callback = useCallback(() => {
const channels = GuildChannelStore.getChannels(guild?.id);
return [{
value: CREATE_NEW_CHANNEL_VALUE,
label: intl.string(t.Cla0re)
}, ...channels != null ? channels[GUILD_SELECTABLE_CHANNELS_KEY].filter((item) => item.channel.type === ChannelTypes.GUILD_TEXT).map(({ channel }) => ({
value: channel.id,
label: computeChannelName(channel, UserStore, RelationshipStore, true)
})) : []];
}, [guild?.id]);
const callback3 = useCallback(() => {
const r16 = import("../../../../../components_native/common/ItemSelectorActionSheet");
const r25 = {
title: intl.string(t.Yr6nGx),
items: callback(),
onItemSelect: (a0) => {
GuildSettingsActionCreators.updateGuild({
rulesChannelId: a0
});
ActionSheetActionCreators.hideActionSheet();
},
selectedItem: null,
hasIcons: false
};
let selectedItem = rulesChannel?.id;
if (selectedItem == null) {
selectedItem = CREATE_NEW_CHANNEL_VALUE;
}
r25.selectedItem = selectedItem;
ActionSheetActionCreators.openLazy(r16, "SelectRulesChannel", r25);
}, [callback, rulesChannel]);
const callback2 = useCallback(() => {
const r16 = import("../../../../../components_native/common/ItemSelectorActionSheet");
const r25 = {
title: intl.string(t.VqhxxN),
items: callback(),
onItemSelect: (a0) => {
GuildSettingsActionCreators.updateGuild({
publicUpdatesChannelId: a0
});
ActionSheetActionCreators.hideActionSheet();
},
selectedItem: null,
hasIcons: false
};
let selectedItem = publicUpdatesChannel?.id;
if (selectedItem == null) {
selectedItem = CREATE_NEW_CHANNEL_VALUE;
}
r25.selectedItem = selectedItem;
ActionSheetActionCreators.openLazy(r16, "SelectUpdatesChannel", r25);
}, [callback, publicUpdatesChannel]);
return <EnableCommunityModalScreen headerRef={ref} disableNextStep={false} currentStep={EnableCommunityModalSteps.STEP_2}>
<View style={styles.content}>
<Text ref={ref} accessibilityRole="header" variant="text-md/semibold" color="text-subtle">
{intl.formatToPlainString(t.tInpJj, {
number: 2,
total: 3
})}
</Text>
<Image2 resizeMode="contain" source={enableCommunityModalIcons.channelSetup} />
<Heading style={styles.header} variant="heading-xl/extrabold" color="mobile-text-heading-primary">
{intl.string(t.YtXpEh)}
</Heading>
<Text style={styles.description} variant="text-md/medium" color="text-subtle">
{intl.string(t["J/fYR8"])}
</Text>
</View>
<Stack spacing={24} style={{
paddingHorizontal: token
}}>
<TableRowGroup helperText={intl.string(t["+Af+Vw"])} hasIcons={false}>
<TableRow label={intl.string(t.dYrhCO)} trailing={<TableRow.TrailingText text={text2} />} arrow onPress={callback3} />
</TableRowGroup>
<TableRowGroup helperText={intl.string(t.ZFeonu)} hasIcons={false}>
<TableRow label={intl.string(t.vAyDGU)} trailing={<TableRow.TrailingText text={text} />} arrow onPress={callback2} />
</TableRowGroup>
</Stack>
</EnableCommunityModalScreen>;
};
@@ -0,0 +1,17 @@
// Metro module 16515 (f16516).
import { View } from "react-native";
import { communityRequirementSatisfied } from "../../../../toast/native/ToastUtils";
import { useEnableCommunitySharedStyles } from "./EnableCommunitySharedStyles";
import { PressableOpacity } from "../../../../../design/void/Pressables/native/Pressables";
export default function CommunityRequirementSatisfiedForm(props) {
const { formSwitchDisabled, children } = props;
const styles = useEnableCommunitySharedStyles();
return <View style={styles.communityRequirementSatisfiedFormWrapper}>
{children}
{formSwitchDisabled ? <PressableOpacity accessibilityRole="button" style={styles.communityRequirementSatisfiedFormPressable} onPress={() => {
if (formSwitchDisabled) {
communityRequirementSatisfied();
}
}} /> : null}
</View>;
};
@@ -0,0 +1,49 @@
// Metro module 16502 (f16503).
import { useMemo } from "react";
import EnableCommunityModalActionCreators from "../../EnableCommunityModalActionCreators";
import { useNavigatorBackPressHandler } from "../../../../../design/components/Navigator/native/useNavigatorBackPressHandler.native";
import { getHeaderTextButton } from "../../../../../design/components/Navigator/native/NavigatorHeader.native";
import { intl, t } from "../../../../../intl/index.native";
import { HeaderActionButton } from "../../../../../design/components/Navigator/native/HeaderActionButton.native";
import Module7699 from "../../../../../_bundle/Module7699";
import { EnableCommunityModalSteps } from "./EnableCommunitySharedNavigation";
import SafetyCheckScreen from "./SafetyCheckScreen";
import ChannelSetupScreen from "./ChannelSetupScreen";
import FinishingTouchesScreen from "./FinishingTouchesScreen";
import { Navigator } from "../../../../../design/components/Navigator/native/Navigator.native";
let HeaderBackButton;
const onModalClose = function onModalClose() {
EnableCommunityModalActionCreators.close();
};
HeaderBackButton = function HeaderBackButton(a0) {
useNavigatorBackPressHandler(() => {
EnableCommunityModalActionCreators.close();
return true;
});
return getHeaderTextButton(intl.string(t["13/7kX"]), onModalClose)(a0);
};
export default function EnableCommunityModal() {
return <Navigator screens={useMemo(() => {
const headerRight = function headerRight() {
return <HeaderActionButton source={Module7699} onPress={onModalClose} accessibilityLabel={intl.string(t.cpT0Cq)} />;
};
const r1 = {};
r1[EnableCommunityModalSteps.STEP_1] = {
headerRight,
headerLeft: HeaderBackButton,
headerTitle: () => null,
render: () => <SafetyCheckScreen />
};
r1[EnableCommunityModalSteps.STEP_2] = {
headerRight,
headerTitle: () => null,
render: () => <ChannelSetupScreen />
};
r1[EnableCommunityModalSteps.STEP_3] = {
headerRight,
headerTitle: () => null,
render: () => <FinishingTouchesScreen />
};
return r1;
}, [])} initialRouteName={EnableCommunityModalSteps.STEP_1} headerBackTitle={intl.string(t["13/7kX"])} />;
};
@@ -0,0 +1,98 @@
// Metro module 16503 (f16504).
import { useEffect } from "react";
import { ScrollView, View } from "react-native";
import GuildSettingsStore from "../../../../guild_settings/GuildSettingsStore";
import { GuildFeatures } from "../../../../../Constants";
import { createStyles } from "../../../../../design/components/Styles/native/createStyles";
import { useStateFromStoresObject } from "../../../../../_bundle/Module589";
import { useNavigation } from "../../../../../design/components/Navigator/native/useNavigation.native";
import { useIsScreenReaderEnabled } from "../../../../a11y/native/useIsScreenReaderEnabled.native";
import { setAccessibilityFocus } from "../../../../a11y/native/setAccessibilityFocus.android";
import Dispatcher from "../../../../../Dispatcher";
import EnableCommunityModalActionCreators from "../../EnableCommunityModalActionCreators";
import { SceneLoadingIndicator } from "../../../../../design/components/Navigator/native/SceneLoadingIndicator.native";
import { SafeAreaPaddingView } from "../../../../../components_native/common/SafeAreaView";
import { Button } from "../../../../../design/components/Button/native/Button.native";
import { intl, t } from "../../../../../intl/index.native";
const useStyles = createStyles({
container: {
flex: 1,
height: "100%"
},
modal: {
height: "100%",
flex: 1,
justifyContent: "space-between"
},
button: {
flexGrow: 0,
paddingLeft: 16,
paddingTop: 16,
paddingRight: 16
}
});
let c11875_11 = {
STEP_1: "STEP_1",
STEP_2: "STEP_2",
STEP_3: "STEP_3"
};
export { c11875_11 as EnableCommunityModalSteps };
export function EnableCommunityModalScreen(props) {
let r80;
let c23262_4, navigation, isScreenReaderEnabled, c23262_7;
const { onSuccess, disableNextStep, children } = props;
let buttonText = props.buttonText;
const { currentStep, headerRef } = props;
c23262_4 = void 0;
navigation = void 0;
isScreenReaderEnabled = void 0;
c23262_7 = void 0;
const styles = useStyles();
const guild = useStateFromStoresObject([GuildSettingsStore], () => GuildSettingsStore.getProps()).guild;
const r30 = guild == null ? void 0 : guild.features.has(GuildFeatures.COMMUNITY);
c23262_4 = r30;
navigation = useNavigation();
isScreenReaderEnabled = useIsScreenReaderEnabled();
const r41 = guild != null;
c23262_7 = r41;
useEffect(() => {
if (isScreenReaderEnabled && c23262_7 && headerRef != null) {
let c28421_0 = setTimeout(() => setAccessibilityFocus({
ref: headerRef
}), 100);
return () => clearTimeout(c28421_0);
}
}, [isScreenReaderEnabled, r41, headerRef]);
useEffect(() => {
if (c23262_4) {
Dispatcher.wait(() => EnableCommunityModalActionCreators.close());
}
}, [r30]);
if (guild == null) {
r80 = <SceneLoadingIndicator />;
} else {
const r63 = [<View style={{
flexGrow: 1
}}>{children}</View>, ,];
if (buttonText == null) {
buttonText = intl.string(t.PDTjLN);
}
r63[1] = <View style={styles.button}>
<Button variant="primary" grow text={buttonText} onPress={function onPress() {
if (guild != null) {
if (c11875_11.STEP_1 === currentStep) {
navigation.push(c11875_11.STEP_2);
} else if (c11875_11.STEP_2 === currentStep) {
navigation.push(c11875_11.STEP_3);
} else if (onSuccess != null) {
onSuccess(guild);
}
}
}} disabled={disableNextStep} />
</View>;
r80 = <ScrollView style={styles.container}>
<SafeAreaPaddingView bottom style={styles.modal}>{r63}</SafeAreaPaddingView>
</ScrollView>;
}
return r80;
}
@@ -0,0 +1,35 @@
// Metro module 16505 (f16506).
import { Platform } from "react-native";
import { createStyles } from "../../../../../design/components/Styles/native/createStyles";
Platform;
const useStyles = createStyles({
content: {
alignItems: "center",
paddingLeft: 16,
paddingRight: 16,
marginTop: 30
},
header: {
marginTop: 12,
textAlign: "center"
},
description: {
marginBottom: 16,
marginTop: 8,
textAlign: "center"
},
formHint: {
paddingHorizontal: 16
},
communityRequirementSatisfiedFormWrapper: {
position: "relative"
},
communityRequirementSatisfiedFormPressable: {
position: "absolute",
width: 80,
top: 0,
right: 0,
height: "100%"
}
});
export { useStyles as useEnableCommunitySharedStyles };
@@ -0,0 +1,132 @@
// Metro module 16517 (f16518).
import _slicedToArray from "../../../../../_bundle/_slicedToArray";
import { useRef, useState, useCallback } from "react";
import { Image as Image2, View } from "react-native";
import GuildSettingsStore from "../../../../guild_settings/GuildSettingsStore";
import GuildRoleStore from "../../../../../stores/GuildRoleStore";
import { CREATE_NEW_CHANNEL_VALUE, MODERATOR_PERMISSIONS, MODERATOR_PERMISSIONS_FLAG } from "../../../PublicGuildsConstants";
import { GuildFeatures, HelpdeskArticles, UserNotificationSettings } from "../../../../../Constants";
import { useToken } from "../../../../../design/tokens/native/useToken";
import Module712 from "../../../../../_bundle/Module712";
import { useStateFromStoresObject } from "../../../../../_bundle/Module589";
import { canEveryone } from "../../../../../utils/PermissionUtils";
import GuildSettingsActionCreators from "../../../../guild_settings/GuildSettingsActionCreators";
import { remove } from "../../../../../_bundle/HighLow";
import { saveRoleSettings } from "../../../../guild_settings/roles/GuildSettingsRolesActionCreators";
import useEnableCommunityModalIcons from "./useEnableCommunityModalIcons";
import { useEnableCommunitySharedStyles } from "./EnableCommunitySharedStyles";
import { EnableCommunityModalScreen, EnableCommunityModalSteps } from "./EnableCommunitySharedNavigation";
import { intl, t } from "../../../../../intl/index.native";
import { Text, Heading } from "../../../../../design/components/Text/native/Text";
import { Stack } from "../../../../../design/components/Stack/native/Stack.native";
import { TableRowGroup } from "../../../../../design/components/TableRow/native/TableRowGroup.native";
import CommunityRequirementSatisfiedForm from "./CommunityRequirementSatisfiedForm";
import { TableSwitchRow } from "../../../../../design/components/TableRow/native/TableSwitchRow.native";
import HelpdeskUtils from "../../../../../utils/HelpdeskUtils";
export default function FinishingTouchesScreen() {
let state;
const ref = useRef(null);
const token = useToken(Module712.modules.mobile.TABLE_ROW_PADDING);
const guild = useStateFromStoresObject([GuildSettingsStore], () => GuildSettingsStore.getProps()).guild;
state = _slicedToArray(useState(guild?.defaultMessageNotifications), 1)[0];
const ONLY_MENTIONS = UserNotificationSettings.ONLY_MENTIONS;
const [value, onValueChange] = useState(false);
const [value2, onValueChange2] = useState(!MODERATOR_PERMISSIONS.some((item) => canEveryone(item, guild)));
const [formSwitchDisabled] = useState(value2);
const defaultMessageNotifications = guild?.defaultMessageNotifications;
const formSwitchDisabled2 = state === ONLY_MENTIONS;
const callback = useCallback((a0) => {
let r3 = a0;
if (a0 && guild?.defaultMessageNotifications !== UserNotificationSettings.ONLY_MENTIONS) {
GuildSettingsActionCreators.updateGuild({
defaultMessageNotifications: UserNotificationSettings.ONLY_MENTIONS
});
} else {
if (!a0) {
r3 = state == null;
}
if (!r3) {
GuildSettingsActionCreators.updateGuild({
defaultMessageNotifications: state
});
}
}
}, [defaultMessageNotifications, state]);
const callback2 = useCallback((a0) => {
const r6 = a0 != null ? GuildRoleStore.getEveryoneRole(a0) : void 0;
if (r6 != null) {
const set = new Set(a0.features);
set.add(GuildFeatures.COMMUNITY);
const permissions = remove(r6.permissions, MODERATOR_PERMISSIONS_FLAG);
const r31 = {
...r6,
permissions
};
const id = a0.id;
let rulesChannelId = a0.rulesChannelId;
if (rulesChannelId == null) {
rulesChannelId = CREATE_NEW_CHANNEL_VALUE;
}
let publicUpdatesChannelId = a0.publicUpdatesChannelId;
if (publicUpdatesChannelId == null) {
publicUpdatesChannelId = CREATE_NEW_CHANNEL_VALUE;
}
GuildSettingsActionCreators.saveGuild(id, {
features: set,
rulesChannelId,
safetyAlertsChannelId: a0.safetyAlertsChannelId,
verificationLevel: a0.verificationLevel,
explicitContentFilter: a0.explicitContentFilter,
publicUpdatesChannelId,
defaultMessageNotifications: a0.defaultMessageNotifications
});
if (permissions !== r6.permissions) {
saveRoleSettings(a0.id, [r31]);
}
}
}, []);
const enableCommunityModalIcons = useEnableCommunityModalIcons();
const styles = useEnableCommunitySharedStyles();
return <EnableCommunityModalScreen headerRef={ref} currentStep={EnableCommunityModalSteps.STEP_3} onSuccess={callback2} disableNextStep={!value} buttonText={intl.string(t.XGl4ba)}>
<View style={styles.content}>
<Text ref={ref} accessibilityRole="header" variant="text-md/semibold" color="text-subtle">
{intl.formatToPlainString(t.tInpJj, {
number: 3,
total: 3
})}
</Text>
<Image2 resizeMode="contain" source={enableCommunityModalIcons.finishingTouches} />
<Heading style={styles.header} variant="heading-xl/extrabold" color="mobile-text-heading-primary">
{intl.string(t["Pj/s/a"])}
</Heading>
<Text style={styles.description} variant="text-md/medium" color="text-subtle">
{intl.string(t["IL7/no"])}
</Text>
</View>
<Stack spacing={24} style={{
paddingHorizontal: token
}}>
<TableRowGroup hasIcons={false}>
<CommunityRequirementSatisfiedForm formSwitchDisabled={formSwitchDisabled2}>
<TableSwitchRow label={intl.format(t.K8Eg4P, {
infoHook: () => null
})} value={guild?.defaultMessageNotifications === UserNotificationSettings.ONLY_MENTIONS} disabled={formSwitchDisabled2} onValueChange={callback} />
</CommunityRequirementSatisfiedForm>
<CommunityRequirementSatisfiedForm formSwitchDisabled={formSwitchDisabled}>
<TableSwitchRow label={intl.format(t.v8qCoG, {
infoHook: () => null
})} value={value2} disabled={formSwitchDisabled} onValueChange={onValueChange2} />
</CommunityRequirementSatisfiedForm>
</TableRowGroup>
<TableRowGroup title={intl.string(t["k+b2Cf"])} hasIcons={false}>
<TableSwitchRow label={intl.string(t["9AG3wI"])} value={value} onValueChange={onValueChange} />
</TableRowGroup>
</Stack>
<Text style={styles.formHint} variant="text-xs/medium" color="text-subtle">
{intl.format(t["BwbW/Q"], {
communityGuidelines: HelpdeskUtils.getArticleURL(HelpdeskArticles.PUBLIC_GUILD_GUILDLINES),
typesOfGuilds: HelpdeskUtils.getArticleURL(HelpdeskArticles.FRIEND_COMMUNITY_DISCOVERABLE_GUILD_TYPES)
})}
</Text>
</EnableCommunityModalScreen>;
};
@@ -0,0 +1,110 @@
// Metro module 16504 (f16505).
import _slicedToArray from "../../../../../_bundle/_slicedToArray";
import { useRef, useState } from "react";
import { Image as Image2, View } from "react-native";
import GuildSettingsStore from "../../../../guild_settings/GuildSettingsStore";
import { GuildExplicitContentFilterTypes, VerificationLevels } from "../../../../../Constants";
import { useToken } from "../../../../../design/tokens/native/useToken";
import Module712 from "../../../../../_bundle/Module712";
import { useEnableCommunitySharedStyles } from "./EnableCommunitySharedStyles";
import { useStateFromStoresObject } from "../../../../../_bundle/Module589";
import useEnableCommunityModalIcons from "./useEnableCommunityModalIcons";
import { EnableCommunityModalScreen, EnableCommunityModalSteps } from "./EnableCommunitySharedNavigation";
import { Text, Heading } from "../../../../../design/components/Text/native/Text";
import { intl, t } from "../../../../../intl/index.native";
import { Stack } from "../../../../../design/components/Stack/native/Stack.native";
import { TableRowGroup } from "../../../../../design/components/TableRow/native/TableRowGroup.native";
import CommunityRequirementSatisfiedForm from "./CommunityRequirementSatisfiedForm";
import { TableSwitchRow } from "../../../../../design/components/TableRow/native/TableSwitchRow.native";
import GuildSettingsActionCreators from "../../../../guild_settings/GuildSettingsActionCreators";
export default function SafetyCheckScreen() {
let state, state2;
const ref = useRef(null);
const token = useToken(Module712.modules.mobile.TABLE_ROW_PADDING);
const styles = useEnableCommunitySharedStyles();
const guild = useStateFromStoresObject([GuildSettingsStore], () => GuildSettingsStore.getProps()).guild;
const enableCommunityModalIcons = useEnableCommunityModalIcons();
let r47 = guild?.verificationLevel;
if (r47 == null) {
r47 = VerificationLevels.NONE;
}
state = _slicedToArray(useState(r47), 1)[0];
let r54 = guild?.explicitContentFilter;
if (r54 == null) {
r54 = GuildExplicitContentFilterTypes.ALL_MEMBERS;
}
state2 = _slicedToArray(useState(r54), 1)[0];
const NONE = VerificationLevels.NONE;
const ALL_MEMBERS = GuildExplicitContentFilterTypes.ALL_MEMBERS;
const r59 = guild == null;
let r60 = null;
if (!r59) {
const disableNextStep = guild.explicitContentFilter !== GuildExplicitContentFilterTypes.ALL_MEMBERS || guild.verificationLevel === VerificationLevels.NONE;
const formSwitchDisabled = state !== NONE;
const formSwitchDisabled2 = state2 === ALL_MEMBERS;
r60 = <EnableCommunityModalScreen headerRef={ref} currentStep={EnableCommunityModalSteps.STEP_1} disableNextStep={disableNextStep}>
<View style={styles.content}>
<Text ref={ref} accessibilityRole="header" variant="text-md/semibold" color="text-subtle">
{intl.formatToPlainString(t.tInpJj, {
number: 1,
total: 3
})}
</Text>
<Image2 resizeMode="contain" source={enableCommunityModalIcons.safetyCheck} />
<Heading style={styles.header} variant="heading-xl/extrabold" color="mobile-text-heading-primary">
{intl.string(t.QrjLYl)}
</Heading>
<Text style={styles.description} variant="text-md/medium" color="text-subtle">
{intl.string(t.i1STwu)}
</Text>
</View>
<Stack spacing={24} style={{
paddingHorizontal: token
}}>
<TableRowGroup helperText={intl.string(t.fHiGA0)} hasIcons={false}>
<CommunityRequirementSatisfiedForm formSwitchDisabled={formSwitchDisabled}>
<TableSwitchRow label={intl.string(t["rkA56+"])} value={guild.verificationLevel !== VerificationLevels.NONE} disabled={formSwitchDisabled} onValueChange={function onValueChange(value) {
L6: {
if (guild != null) {
if (value && guild.verificationLevel < VerificationLevels.LOW) {
GuildSettingsActionCreators.updateGuild({
verificationLevel: VerificationLevels.LOW
});
break L6;
}
if (!value) {
GuildSettingsActionCreators.updateGuild({
verificationLevel: state
});
}
}
}
}} />
</CommunityRequirementSatisfiedForm>
</TableRowGroup>
<TableRowGroup helperText={intl.string(t.b0MaDV)} hasIcons={false}>
<CommunityRequirementSatisfiedForm formSwitchDisabled={formSwitchDisabled2}>
<TableSwitchRow label={intl.string(t.zOuzl7)} value={guild.explicitContentFilter === GuildExplicitContentFilterTypes.ALL_MEMBERS} disabled={formSwitchDisabled2} onValueChange={function onValueChange(value) {
L6: {
if (guild != null) {
if (value && guild.explicitContentFilter < GuildExplicitContentFilterTypes.ALL_MEMBERS) {
GuildSettingsActionCreators.updateGuild({
explicitContentFilter: GuildExplicitContentFilterTypes.ALL_MEMBERS
});
break L6;
}
if (!value) {
GuildSettingsActionCreators.updateGuild({
explicitContentFilter: state2
});
}
}
}
}} />
</CommunityRequirementSatisfiedForm>
</TableRowGroup>
</Stack>
</EnableCommunityModalScreen>;
}
return r60;
};
@@ -0,0 +1,45 @@
// Metro module 16506 (f16507).
import _slicedToArray from "../../../../../_bundle/_slicedToArray";
import { useState } from "react";
import { ThemeTypes } from "../../../../../_bundle/Module505";
import { isThemeDark } from "../../../../../design/shared";
import * as _Module16507 from "../../../../../_bundle/Module16507";
import * as _Module16508 from "../../../../../_bundle/Module16508";
import { getChannelSetupSource } from "../../../../../design/components/Illustration/native/redesign/generated/ChannelSetup";
import * as _Module16513 from "../../../../../_bundle/Module16513";
import * as _Module16514 from "../../../../../_bundle/Module16514";
import * as _Module7699 from "../../../../../_bundle/Module7699";
import useTheme from "../../../../../hooks/useTheme";
class EnableCommunityModalIcons {
constructor(a0) {
const r5 = {
__proto__: new.target.prototype,
theme: ThemeTypes.LIGHT
};
r5.theme = a0;
return r5;
}
get safetyCheck() {
return isThemeDark(this.theme) ? _Module16507 : _Module16508;
}
get channelSetup() {
return getChannelSetupSource(this.theme);
}
get finishingTouches() {
return isThemeDark(this.theme) ? _Module16513 : _Module16514;
}
get close() {
return _Module7699;
}
}
export default function useEnableCommunityModalIcons() {
const theme = useTheme();
return _slicedToArray(useState(() => {
const r10 = {
__proto__: EnableCommunityModalIcons.prototype,
theme: ThemeTypes.LIGHT
};
r10.theme = theme;
return r10;
}), 1)[0];
};