/* Metro module 11982; source: components_native/warnings/GuildNSFW.tsx; dependencies: [29, 31, 1867, 1229, 33, 566, 5072, 4813, 6593, 5263, 5074, 1244, 11983, 2] */
import ObjectWithoutProperties from '../../by-id/module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
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 FluxModule from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as AgeGateConstantsModule from '../../modules/age_gate/AgeGateConstants.tsx'; /* Metro dependency 1229 */
import * as AgeVerificationUtilsModule from '../../modules/age_assurance/AgeVerificationUtils.tsx'; /* Metro dependency 4813 */
import * as AgeGateUtilsModule from '../../modules/age_gate/AgeGateUtils.tsx'; /* Metro dependency 5072 */
import * as AgeVerificationAnalyticsUtilsModule from '../../modules/age_assurance/AgeVerificationAnalyticsUtils.tsx'; /* Metro dependency 5074 */
function _fun91972(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91972, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12168:6, offset: 0x020785e1, size: 210 bytes, params: 8, frame: 19
const env0_0 = require;
const env0_3 = ['modalType'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(FileImportTrackerModule).fileFinishedImporting('components_native/warnings/GuildNSFW.tsx');
exports.default = GuildNSFW;
function GuildNSFW(a0) { // fn#91973, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12168:190, offset: 0x020786b3, size: 576 bytes, params: 2, frame: 21
const env0_0 = a0;
const onDisagree_919742 = onDisagree_91974;
const value2 = undefined;
const guild = (FluxModule).useStateFromStores([GuildStore], _fun91975);
const value3 = (AgeGateUtilsModule).useAgeGateVerifyContentForGuild(guild);
const modalType = value3.modalType;
let binding = ObjectWithoutProperties;
const value4 = binding(value3, env0_3);
const useMaybePerformReactiveCheckForSource = AgeVerificationUtilsModule.useMaybePerformReactiveCheckForSource;
const NSFW_SERVER = AgeGateSource.NSFW_SERVER;
Reflect.apply(useMaybePerformReactiveCheckForSource, AgeVerificationUtilsModule, [NSFW_SERVER]);
binding = ReactModule;
const value5 = binding.useCallback(function() {
var defaultImport = importDefault(dependencyMap[9]);
var object = {};
object.entryPoint = require(dependencyMap[10]).AgeVerificationModalEntryPoint.NSFW_GUILD;
defaultImport.showAgeVerificationGetStartedModal(object);
}, []);
object = {};
copyDataProperties(object, value4, binding);
object['guildId'] = guild == null ? value2 : guild.id;
object['channelId'] = a0.channelId;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object['disagreement'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['/g10LC']);
const NsfwSpaceWarningModalType = (AgeVerificationAnalyticsUtilsModule).NsfwSpaceWarningModalType;
const NSFW_CHANNEL_AGE_VERIFY = NsfwSpaceWarningModalType.NSFW_CHANNEL_AGE_VERIFY;
if (NSFW_CHANNEL_AGE_VERIFY === modalType) {
return ((Component) => )(importDefault(11983) /* metro dependency 11983: GatedContent */);
}
const GUILD_LARGE_SERVER = NsfwSpaceWarningModalType.GUILD_LARGE_SERVER;
if (GUILD_LARGE_SERVER === modalType) {
return ((Component) => )(importDefault(11983) /* metro dependency 11983: GatedContent */);
}
const NSFW_CHANNEL_UNDERAGE = NsfwSpaceWarningModalType.NSFW_CHANNEL_UNDERAGE;
if (NSFW_CHANNEL_UNDERAGE === modalType) {
return ((Component) => )(importDefault(11983) /* metro dependency 11983: GatedContent */);
}
return ((Component) => )(importDefault(11983) /* metro dependency 11983: GatedContent */);
function GuildNSFWOnDisagree() { // fn#91974, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12168:346, owner: GuildNSFW.onDisagree, offset: 0x020788f3, size: 76 bytes, params: 1, frame: 14
let value = environment.__proto__;
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
const nsfwReturnToSafety = value.nsfwReturnToSafety;
const binding = env0_0;
Reflect.apply(nsfwReturnToSafety, value, [binding.guildId]);
if (binding.onReturnToSafety != null) {
env0_0.onReturnToSafety();
}
}
function _fun91975() { // fn#91975, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12168:250, offset: 0x0207893f, size: 32 bytes, params: 1, frame: 11
return GuildStore.getGuild(env0_0.guildId);
}
function GuildNSFWOnAgree() { // fn#91977, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12168:1189, owner: GuildNSFW.onAgree, offset: 0x020789a8, size: 50 bytes, params: 1, frame: 12
let value = environment.__proto__;
value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */;
value.nsfwAgree(env0_0.guildId);
}
}
}
global.__d(_fun91972, 11982, [29, 31, 1867, 1229, 33, 566, 5072, 4813, 6593, 5263, 5074, 1244, 11983,
2]) /* metro module 11982, dependencies: [29, 31, 1867, 1229, 33, 566, 5072, 4813, 6593, 5263, 5074, 1244, 11983, 2] */;