decord/source/components_native/warnings/GuildNSFW.tsx

74 lines
3.1 KiB
TypeScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 10033
// Function ID: 10034
2026-07-20 16:05:17 +00:00
// Name: GuildNSFW
2026-07-29 08:29:29 +00:00
// Dependencies: [109, 19, 1862, 1221, 21, 589, 4403, 4405, 5105, 6747, 6749, 1236, 10034, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-29 08:29:29 +00:00
// Module 10033 (GuildNSFW)
2026-07-23 10:11:24 +00:00
import _objectWithoutProperties from "_objectWithoutProperties";
2026-07-29 08:29:29 +00:00
import noop from "noop";
import createGuildRecordFromRust from "createGuildRecordFromRust";
2026-07-23 10:11:24 +00:00
import { AgeGateSource } from "result";
import { jsx } from "jsxProd";
const require = arg1;
let closure_3 = ["modalType"];
2026-07-29 08:29:29 +00:00
let result = require("createGuildRecordFromRust").fileFinishedImporting("components_native/warnings/GuildNSFW.tsx");
2026-07-20 16:05:17 +00:00
export default function GuildNSFW(channelId) {
2026-07-23 10:11:24 +00:00
const _require = channelId;
2026-07-29 08:29:29 +00:00
let obj = _require(589);
const items = [createGuildRecordFromRust];
2026-07-23 10:11:24 +00:00
const stateFromStores = obj.useStateFromStores(items, () => outer1_6.getGuild(channelId.guildId));
2026-07-29 08:29:29 +00:00
let obj1 = _require(4403);
2026-07-20 16:05:17 +00:00
const ageGateVerifyContentForGuild = obj1.useAgeGateVerifyContentForGuild(stateFromStores);
const modalType = ageGateVerifyContentForGuild.modalType;
2026-07-29 08:29:29 +00:00
let obj2 = _require(4405);
2026-07-20 16:05:17 +00:00
const maybePerformReactiveCheckForSource = obj2.useMaybePerformReactiveCheckForSource(AgeGateSource.NSFW_SERVER);
obj = {};
const callback = React.useCallback(() => {
2026-07-29 08:29:29 +00:00
let obj = callback(6747);
obj = { entryPoint: channelId(6749).AgeVerificationModalEntryPoint.NSFW_GUILD };
2026-07-20 16:05:17 +00:00
const result = obj.showAgeVerificationGetStartedModal(obj);
}, []);
const merged = Object.assign(callback(ageGateVerifyContentForGuild, closure_3));
let id;
2026-07-29 08:29:29 +00:00
if (stateFromStores != null) {
2026-07-20 16:05:17 +00:00
id = stateFromStores.id;
}
2026-07-29 08:29:29 +00:00
function handleDisagree() {
outer1_1(outer1_2[8]).nsfwReturnToSafety(channelId.guildId);
if (channelId.onReturnToSafety != null) {
onReturnToSafety();
}
}
obj.guildId = id;
obj.channelId = channelId.channelId;
const intl = tmp(1236).intl;
obj.disagreement = intl.string(_require(1236).t["/g10LC"]);
if (_require(6749).NsfwSpaceWarningModalType.NSFW_CHANNEL_AGE_VERIFY !== modalType) {
if (tmp(6749).NsfwSpaceWarningModalType.GUILD_LARGE_SERVER !== modalType) {
if (tmp(6749).NsfwSpaceWarningModalType.NSFW_CHANNEL_UNDERAGE === modalType) {
obj = { modalType: null, disagreementButtonVariant: "primary", onDisagree: null };
obj[0] = modalType;
obj[2] = handleDisagree;
2026-07-20 16:05:17 +00:00
const merged1 = Object.assign(obj);
2026-07-29 08:29:29 +00:00
return jsx(importDefault(10034), { modalType: null, disagreementButtonVariant: "primary", onDisagree: null });
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
obj1 = { modalType: null, onAgree: null, onDisagree: null };
obj1[0] = modalType;
obj1[1] = function handleAgree() {
outer1_1(outer1_2[8]).nsfwAgree(channelId.guildId);
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
obj1[2] = handleDisagree;
2026-07-20 16:05:17 +00:00
const merged2 = Object.assign(obj);
2026-07-29 08:29:29 +00:00
return jsx(importDefault(10034), { modalType: null, onAgree: null, onDisagree: null });
2026-07-20 16:05:17 +00:00
}
}
}
obj2 = { modalType, onAgree: callback, onDisagree: handleDisagree };
2026-07-29 08:29:29 +00:00
const tmp5 = callback(ageGateVerifyContentForGuild, closure_3);
2026-07-20 16:05:17 +00:00
const merged3 = Object.assign(obj);
2026-07-29 08:29:29 +00:00
return jsx(importDefault(10034), { modalType, onAgree: callback, onDisagree: handleDisagree });
2026-07-20 16:05:17 +00:00
};