// Module ID: 12835 // Function ID: 12836 // Name: NUFGuildTemplates // Dependencies: [5, 19, 17, 4462, 1074, 12836, 7081, 21, 5601, 12603, 11350, 12837, 12873, 1242, 1250, 5705, 12812, 1100, 12839, 12841, 12462, 1114, 12844, 12845, 12874, 12856, 7103, 2] // Exports: default // Module 12835 (NUFGuildTemplates) import util from "util" /* 1114 */; import discord_common_AnalyticsUtils from "discord_common/AnalyticsUtils" /* 1250 */; import GuildActionCreatorsDefault from "GuildActionCreators" /* 5601 */; import NavigatorHeader from "NavigatorHeader" /* 5705 */; import Navigator from "Navigator" /* 7103 */; import asyncGeneratorStep from "asyncGeneratorStep" /* 5 */; import noop from "module_19" /* 19 */; import DefaultRouteStore from "DefaultRouteStore" /* 4462 */; require = fn; function onCreateGuild() { const self = this; const apply = closure_16.apply; if (typeof apply === "unknown") { let applyArgumentsResult = HermesBuiltin.applyArguments(self); } else { applyArgumentsResult = apply(self, arguments); } return applyArgumentsResult; } let closure_16 = async function _onCreateGuild(arg0, value) { if (c4 === 2) { c4 = 3; throw new TypeError("Generator functions may not be called on executing generators"); } else if (tmp4 === 3) { if (arg0 === 1) { throw value; } else if (arg0 === 2) { const obj3 = { value, done: true }; return obj3; } else { return { value: "HermesInternal", done: null }; } } else { try { c4 = 2; if (0 === c3) { if (arg0 === 1) { c4 = 3; throw value; } else if (arg0 === 2) { c4 = 3; const obj4 = { value, done: true }; return obj4; } else { closure_2 = tmp5; closure_1 = tmp2; closure_129_0 = closure_0; c3 = 1; c4 = 1; const obj5 = { value: GuildActionCreatorsDefault.transitionToGuildSync(closure_0), done: false }; return obj5; } } else if (arg0 === 1) { c4 = 3; throw value; } else if (arg0 === 2) { c4 = 3; obj = { value, done: true }; return obj; } else { const guildProgress = closure_130_0(closure_130_2[9]).createGuildProgress(closure_129_0); closure_130_1(closure_130_2[10])(); const obj6 = closure_130_0(closure_130_2[9]); const result = closure_130_1(closure_130_2[11]).closeCreateGuildOnboardingModal(); const obj7 = closure_130_1(closure_130_2[11]); const result1 = closure_130_0(closure_130_2[12]).showInstantInviteModal(closure_129_0); const obj8 = closure_130_0(closure_130_2[12]); const obj10 = { flow_type: closure_130_8.GUILD_CREATE_MODAL, from_step: closure_130_11.CREATE_SERVER, to_step: "modal_closed" }; closure_130_1(closure_130_2[13]).track(closure_130_7.USER_FLOW_TRANSITION, obj10); c4 = 3; return { value: "HermesInternal", done: null }; } } catch (tmp9) { c4 = tmp; throw tmp9; } } }; let closure_17 = async function _onCreateServer(arg0, arg1, arg2) { closure_0 = arg0; closure_1 = arg1; let id = arg2; c4 = 0; c3 = 0; return (async (arg0, value, arg2) => { if (c3 === 2) { c3 = 3; throw new TypeError("Generator functions may not be called on executing generators"); } else if (tmp3 === 3) { if (arg0 === 1) { throw value; } else if (arg0 === 2) { const obj2 = { value, done: true }; return obj2; } else { return { value: "HermesInternal", done: null }; } } else { try { c3 = 2; if (0 === c4) { if (arg0 === 1) { c3 = 3; throw value; } else if (arg0 === 2) { c3 = 3; const obj3 = { value, done: true }; return obj3; } else { if (id.id !== constants.CREATE) { c4 = 1; c3 = 1; const obj4 = { value: onCreateGuild(tmp13), done: false }; return obj4; } else { const obj5 = { guildId: tmp13 }; arr.push(constants2.CHANNEL_PROMPT, obj5); } arr = closure_0; } } else if (arg0 === 1) { c3 = 3; throw value; } else if (arg0 === 2) { c3 = 3; obj = { value, done: true }; return obj; } c3 = 3; return { value: "HermesInternal", done: null }; } catch (tmp8) { c3 = tmp; throw tmp8; } } })(); }; const Keyboard = fn(17).Keyboard; const Constants = fn(1074); ({ AnalyticEvents: closure_7, AnalyticsSections: closure_8, NOOP: closure_9 } = Constants); const GuildTemplateId = fn(12836).GuildTemplateId; const CreateGuildConstants = fn(7081); ({ CreateGuildModalStates: closure_11, GuildTemplateTriggers: closure_12, NUXGuildTemplatesAnalytics: map1 } = CreateGuildConstants); const jsx = fn(21).jsx; let obj = { impression_group: fn(1250).ImpressionGroups.GUILD_ADD_FLOW }; const size = fn(2); let result = size.fileFinishedImporting("modules/nuf/native/components/NUFGuildTemplates.tsx"); export default function NUFGuildTemplates() { obj = { screens: noop.useMemo(() => { obj = {}; let obj2 = { impressionName: discord_common_AnalyticsUtils.ImpressionNames.GUILD_ADD_LANDING, impressionProperties, fullscreen: true, headerTitle() { return null; }, headerLeft: NavigatorHeader.getHeaderCloseButton(() => { closure_1_0(12812).trackNUFStep(constants2.STEP_GUILD_TEMPLATE, constants2.STEP_FRIEND_LIST, { skip: true }); obj = closure_1_0(12812); closure_1_0(1100).transitionTo(fallbackRoute.fallbackRoute); const obj2 = closure_1_0(1100); const result = closure_1_1(12837).closeCreateGuildOnboardingModal(); }), render() { return closure_1_14(closure_1_1(12839), { trigger: constants.NUF }); } }; obj[constants.GUILD_TEMPLATES] = obj2; obj[constants.CREATION_INTENT] = { impressionName: discord_common_AnalyticsUtils.ImpressionNames.GUILD_ADD_INTENT_SELECTION, impressionProperties, fullscreen: true, headerTitle() { return null; }, render(guildTemplate) { return closure_1_14(closure_1_1(12841), { guildTemplate: guildTemplate.guildTemplate, trigger: constants.NUF }); } }; const obj4 = { impressionName: discord_common_AnalyticsUtils.ImpressionNames.GUILD_ADD_INTENT_SELECTION, impressionProperties, fullscreen: true, headerTitle() { return null; }, render(guildTemplate) { return closure_1_14(closure_1_1(12841), { guildTemplate: guildTemplate.guildTemplate, trigger: constants.NUF }); } }; obj[constants.CREATE_SERVER] = { impressionName: discord_common_AnalyticsUtils.ImpressionNames.GUILD_ADD_CUSTOMIZE, impressionProperties, fullscreen: true, headerTitle() { return null; }, render(arg0, arg1) { const guildTemplate = arg0; closure_1 = arg1; obj = {}; const merged = Object.assign(arg0); obj.onCreate = function onCreate(guild) { return (function onCreateServer() { const self = this; const apply = closure_1_17.apply; if (typeof apply === "unknown") { let applyArgumentsResult = HermesBuiltin.applyArguments(self); } else { applyArgumentsResult = apply(self, arguments); } return applyArgumentsResult; })(closure_1, guild.guild.id, guildTemplate.guildTemplate); }; const intl = guildTemplate(1114).intl; obj.customTitle = intl.string(guildTemplate(1114).t["5HZu07"]); return closure_14(closure_1(12462), obj); } }; const obj5 = { impressionName: discord_common_AnalyticsUtils.ImpressionNames.GUILD_ADD_CUSTOMIZE, impressionProperties, fullscreen: true, headerTitle() { return null; }, render(arg0, arg1) { const guildTemplate = arg0; closure_1 = arg1; obj = {}; const merged = Object.assign(arg0); obj.onCreate = function onCreate(guild) { return (function onCreateServer() { const self = this; const apply = closure_1_17.apply; if (typeof apply === "unknown") { let applyArgumentsResult = HermesBuiltin.applyArguments(self); } else { applyArgumentsResult = apply(self, arguments); } return applyArgumentsResult; })(closure_1, guild.guild.id, guildTemplate.guildTemplate); }; const intl = guildTemplate(1114).intl; obj.customTitle = intl.string(guildTemplate(1114).t["5HZu07"]); return closure_14(closure_1(12462), obj); } }; obj[constants.JOIN_SERVER] = { impressionName: discord_common_AnalyticsUtils.ImpressionNames.GUILD_ADD_JOIN, impressionProperties, fullscreen: true, headerTitle() { return null; }, render() { obj = { location: "Onboarding Join Guild Modal", onClose: closure_1_1(12837).closeCreateGuildModal }; return closure_1_14(closure_1_1(12844), obj); } }; const obj6 = { impressionName: discord_common_AnalyticsUtils.ImpressionNames.GUILD_ADD_JOIN, impressionProperties, fullscreen: true, headerTitle() { return null; }, render() { obj = { location: "Onboarding Join Guild Modal", onClose: closure_1_1(12837).closeCreateGuildModal }; return closure_1_14(closure_1_1(12844), obj); } }; obj[constants.ACCEPT_INVITE] = { impressionName: discord_common_AnalyticsUtils.ImpressionNames.GUILD_ADD_ACCEPT_INVITE, impressionProperties, fullscreen: true, headerTitle() { return null; }, headerLeft() { return null; }, render(code) { obj = { code: code.code, onPressClose: closure_1_1(12837).closeCreateGuildModal }; return closure_1_14(closure_1_1(12845), obj); } }; const obj7 = { impressionName: discord_common_AnalyticsUtils.ImpressionNames.GUILD_ADD_ACCEPT_INVITE, impressionProperties, fullscreen: true, headerTitle() { return null; }, headerLeft() { return null; }, render(code) { obj = { code: code.code, onPressClose: closure_1_1(12837).closeCreateGuildModal }; return closure_1_14(closure_1_1(12845), obj); } }; obj[constants.CHANNEL_PROMPT] = { impressionName: discord_common_AnalyticsUtils.ImpressionNames.GUILD_ADD_CHANNEL_PROMPT, impressionProperties, fullscreen: true, headerTitle() { return null; }, render(guildId) { guildId = guildId.guildId; obj = { hasSkip: true, hasBack: false, onCancel, onSuccess() { return closure_2_15(guildId); }, guildId, buttonText: null }; const intl = guildId(1114).intl; obj.buttonText = intl.string(guildId(1114).t["uHXB+F"]); return closure_14(closure_1(12874), obj); } }; const obj9 = { impressionName: "Array", impressionProperties, fullscreen: true, ignoreKeyboard: null, headerTitle() { return null; }, headerLeft() { return null; }, render() { return closure_1_14(closure_1_1(12856), { isNestedNavigator: true }); } }; obj[constants.JOIN_STUDENT_HUB] = obj9; return obj; }, []), onWillFocus: Keyboard.dismiss, headerBackTitle: null, initialRouteName: null }; let intl = util.intl; obj.headerBackTitle = intl.string(util.t["13/7kX"]); obj.initialRouteName = constants.GUILD_TEMPLATES; return jsx(Navigator.Navigator, { screens: noop.useMemo(() => { obj = {}; let obj2 = { impressionName: discord_common_AnalyticsUtils.ImpressionNames.GUILD_ADD_LANDING, impressionProperties, fullscreen: true, headerTitle() { return null; }, headerLeft: NavigatorHeader.getHeaderCloseButton(() => { closure_1_0(12812).trackNUFStep(constants2.STEP_GUILD_TEMPLATE, constants2.STEP_FRIEND_LIST, { skip: true }); obj = closure_1_0(12812); closure_1_0(1100).transitionTo(fallbackRoute.fallbackRoute); const obj2 = closure_1_0(1100); const result = closure_1_1(12837).closeCreateGuildOnboardingModal(); }), render() { return closure_1_14(closure_1_1(12839), { trigger: constants.NUF }); } }; obj[constants.GUILD_TEMPLATES] = obj2; obj[constants.CREATION_INTENT] = { impressionName: discord_common_AnalyticsUtils.ImpressionNames.GUILD_ADD_INTENT_SELECTION, impressionProperties, fullscreen: true, headerTitle() { return null; }, render(guildTemplate) { return closure_1_14(closure_1_1(12841), { guildTemplate: guildTemplate.guildTemplate, trigger: constants.NUF }); } }; const obj4 = { impressionName: discord_common_AnalyticsUtils.ImpressionNames.GUILD_ADD_INTENT_SELECTION, impressionProperties, fullscreen: true, headerTitle() { return null; }, render(guildTemplate) { return closure_1_14(closure_1_1(12841), { guildTemplate: guildTemplate.guildTemplate, trigger: constants.NUF }); } }; obj[constants.CREATE_SERVER] = { impressionName: discord_common_AnalyticsUtils.ImpressionNames.GUILD_ADD_CUSTOMIZE, impressionProperties, fullscreen: true, headerTitle() { return null; }, render(arg0, arg1) { const guildTemplate = arg0; closure_1 = arg1; obj = {}; const merged = Object.assign(arg0); obj.onCreate = function onCreate(guild) { return (function onCreateServer() { const self = this; const apply = closure_1_17.apply; if (typeof apply === "unknown") { let applyArgumentsResult = HermesBuiltin.applyArguments(self); } else { applyArgumentsResult = apply(self, arguments); } return applyArgumentsResult; })(closure_1, guild.guild.id, guildTemplate.guildTemplate); }; const intl = guildTemplate(1114).intl; obj.customTitle = intl.string(guildTemplate(1114).t["5HZu07"]); return closure_14(closure_1(12462), obj); } }; const obj5 = { impressionName: discord_common_AnalyticsUtils.ImpressionNames.GUILD_ADD_CUSTOMIZE, impressionProperties, fullscreen: true, headerTitle() { return null; }, render(arg0, arg1) { const guildTemplate = arg0; closure_1 = arg1; obj = {}; const merged = Object.assign(arg0); obj.onCreate = function onCreate(guild) { return (function onCreateServer() { const self = this; const apply = closure_1_17.apply; if (typeof apply === "unknown") { let applyArgumentsResult = HermesBuiltin.applyArguments(self); } else { applyArgumentsResult = apply(self, arguments); } return applyArgumentsResult; })(closure_1, guild.guild.id, guildTemplate.guildTemplate); }; const intl = guildTemplate(1114).intl; obj.customTitle = intl.string(guildTemplate(1114).t["5HZu07"]); return closure_14(closure_1(12462), obj); } }; obj[constants.JOIN_SERVER] = { impressionName: discord_common_AnalyticsUtils.ImpressionNames.GUILD_ADD_JOIN, impressionProperties, fullscreen: true, headerTitle() { return null; }, render() { obj = { location: "Onboarding Join Guild Modal", onClose: closure_1_1(12837).closeCreateGuildModal }; return closure_1_14(closure_1_1(12844), obj); } }; const obj6 = { impressionName: discord_common_AnalyticsUtils.ImpressionNames.GUILD_ADD_JOIN, impressionProperties, fullscreen: true, headerTitle() { return null; }, render() { obj = { location: "Onboarding Join Guild Modal", onClose: closure_1_1(12837).closeCreateGuildModal }; return closure_1_14(closure_1_1(12844), obj); } }; obj[constants.ACCEPT_INVITE] = { impressionName: discord_common_AnalyticsUtils.ImpressionNames.GUILD_ADD_ACCEPT_INVITE, impressionProperties, fullscreen: true, headerTitle() { return null; }, headerLeft() { return null; }, render(code) { obj = { code: code.code, onPressClose: closure_1_1(12837).closeCreateGuildModal }; return closure_1_14(closure_1_1(12845), obj); } }; const obj7 = { impressionName: discord_common_AnalyticsUtils.ImpressionNames.GUILD_ADD_ACCEPT_INVITE, impressionProperties, fullscreen: true, headerTitle() { return null; }, headerLeft() { return null; }, render(code) { obj = { code: code.code, onPressClose: closure_1_1(12837).closeCreateGuildModal }; return closure_1_14(closure_1_1(12845), obj); } }; obj[constants.CHANNEL_PROMPT] = { impressionName: discord_common_AnalyticsUtils.ImpressionNames.GUILD_ADD_CHANNEL_PROMPT, impressionProperties, fullscreen: true, headerTitle() { return null; }, render(guildId) { guildId = guildId.guildId; obj = { hasSkip: true, hasBack: false, onCancel, onSuccess() { return closure_2_15(guildId); }, guildId, buttonText: null }; const intl = guildId(1114).intl; obj.buttonText = intl.string(guildId(1114).t["uHXB+F"]); return closure_14(closure_1(12874), obj); } }; const obj9 = { impressionName: "Array", impressionProperties, fullscreen: true, ignoreKeyboard: null, headerTitle() { return null; }, headerLeft() { return null; }, render() { return closure_1_14(closure_1_1(12856), { isNestedNavigator: true }); } }; obj[constants.JOIN_STUDENT_HUB] = obj9; return obj; }, []), onWillFocus: Keyboard.dismiss, headerBackTitle: null, initialRouteName: null }); };