decord/source/components_native/warnings/GuildNSFW.tsx
github-actions 67d978d9fb chore: update source for alpha 346.0
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9672_m.js (378.6 MB)
2026-09-07 16:44:02 +00:00

74 lines
3.2 KiB
TypeScript

// Module ID: 12669
// Function ID: 12670
// Name: GuildNSFW
// Dependencies: [109, 19, 1979, 1098, 21, 504, 4771, 4773, 5520, 8411, 8413, 1114, 12670, 2]
// Exports: default
// Module 12669 (GuildNSFW)
import GatedContentDefault from "GatedContent" /* 12670 */;
import closure_4 from "_objectWithoutProperties" /* 109 */;
import closure_5 from "noop" /* 19 */;
import closure_6 from "createGuildRecordFromRust" /* 1979 */;
import { AgeGateSource } from "result" /* 1098 */;
import { jsx } from "jsxProd" /* 21 */;
const require = arg1;
let closure_3 = ["modalType"];
let result = require("set").fileFinishedImporting("components_native/warnings/GuildNSFW.tsx");
export default function GuildNSFW(channelId) {
const _require = channelId;
let obj = _require(504);
const items = [closure_6];
const stateFromStores = obj.useStateFromStores(items, () => closure_1_6.getGuild(channelId.guildId));
obj1 = _require(4771);
const ageGateVerifyContentForGuild = obj1.useAgeGateVerifyContentForGuild(stateFromStores);
const modalType = ageGateVerifyContentForGuild.modalType;
let obj2 = _require(4773);
const maybePerformReactiveCheckForSource = obj2.useMaybePerformReactiveCheckForSource(AgeGateSource.NSFW_SERVER);
obj = {};
const callback = React.useCallback(() => {
let obj = callback(8411);
obj = { entryPoint: channelId(8413).AgeVerificationModalEntryPoint.NSFW_GUILD };
const result = obj.showAgeVerificationGetStartedModal(obj);
}, []);
const merged = Object.assign(callback(ageGateVerifyContentForGuild, closure_3));
let id;
if (stateFromStores != null) {
id = stateFromStores.id;
}
function handleDisagree() {
closure_1_1(closure_1_2[8]).nsfwReturnToSafety(channelId.guildId);
if (channelId.onReturnToSafety != null) {
onReturnToSafety();
}
}
obj.guildId = id;
obj.channelId = channelId.channelId;
const intl = tmp(1114).intl;
obj.disagreement = intl.string(_require(1114).t["/g10LC"]);
if (_require(8413).NsfwSpaceWarningModalType.NSFW_CHANNEL_AGE_VERIFY !== modalType) {
if (tmp(8413).NsfwSpaceWarningModalType.GUILD_LARGE_SERVER !== modalType) {
if (tmp(8413).NsfwSpaceWarningModalType.NSFW_CHANNEL_UNDERAGE === modalType) {
obj = { modalType: null, disagreementButtonVariant: "primary", onDisagree: null };
obj[0] = modalType;
obj[2] = handleDisagree;
const merged1 = Object.assign(obj);
return jsx(GatedContentDefault, { modalType: null, disagreementButtonVariant: "primary", onDisagree: null });
} else {
obj1 = { modalType: null, onAgree: null, onDisagree: null };
obj1[0] = modalType;
obj1[1] = function handleAgree() {
closure_1_1(closure_1_2[8]).nsfwAgree(channelId.guildId);
};
obj1[2] = handleDisagree;
const merged2 = Object.assign(obj);
return jsx(GatedContentDefault, { modalType: null, onAgree: null, onDisagree: null });
}
}
}
obj2 = { modalType, onAgree: callback, onDisagree: handleDisagree };
const tmp5 = callback(ageGateVerifyContentForGuild, closure_3);
const merged3 = Object.assign(obj);
return jsx(GatedContentDefault, { modalType, onAgree: callback, onDisagree: handleDisagree });
};