Files
discord-decomp/modules/age_gate/native/components/NsfwGateGuildSettingsActionSheet.tsx
T
2026-11-01 12:12:55 +02:00

27 lines
1.6 KiB
TypeScript

// Metro module 13046 (f13047).
import { useMessageRequestPrivacyOption } from "../../../message_request/native/hooks/useMessageRequestPrivacyOption";
import { ActionSheet } from "../../../../design/components/Sheet/native/ActionSheet.native";
import { BottomSheetTitleHeader } from "../../../../design/components/Sheet/native/BottomSheetTitleHeader.native";
import { ActionSheetRow } from "../../../../design/components/Sheet/native/ActionSheetRow.native";
import { intl, t } from "../../../../intl/index.native";
import ActionSheetActionCreators from "../../../action_sheet/native/ActionSheetActionCreators";
import NotificationSettingsModalActionCreators from "../../../../actions/NotificationSettingsModalActionCreators";
import { RestrictedGuildPrivacyOption, handleLeaveServer } from "../../../guild_action_sheet/native/components/GuildActionSheetActions";
export default function NsfwGateGuildSettingsActionSheet(props) {
const guild = props.guild;
const messageRequestPrivacyOption = useMessageRequestPrivacyOption({
guild
});
return <ActionSheet header={<BottomSheetTitleHeader title={guild.name} />}>
<ActionSheetRow.Group hasIcons={false}>
<ActionSheetRow label={intl.string(t.h850Ss)} onPress={() => {
ActionSheetActionCreators.hideActionSheet();
NotificationSettingsModalActionCreators.open(guild.id);
}} />
<RestrictedGuildPrivacyOption guild={guild} />
{messageRequestPrivacyOption}
<ActionSheetRow variant="danger" label={intl.string(t.J2TBi3)} onPress={() => handleLeaveServer(guild)} />
</ActionSheetRow.Group>
</ActionSheet>;
};