// Module ID: 11959 // Function ID: 11960 // Name: useTrackCreateGuildViewed // Dependencies: [19, 7602, 1078, 558, 568, 1245, 2] // Module 11959 (useTrackCreateGuildViewed) import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1245 */; import noop from "module_19" /* 19 */; const require = globalThis.__r; const require = fn; const GuildTemplateStates = fn(7602).GuildTemplateStates; const AnalyticEvents = fn(1078).AnalyticEvents; const ReactCompilerGating = fn(558); const size = fn(2); const result = size.fileFinishedImporting("modules/guild_templates/useTrackCreateGuildViewed.tsx"); export default ReactCompilerGating.isReactCompilerEnabled() ? ((arg0) => { _require = arg0; const cResult = require("c").c(3); if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) { const items = []; cResult[0] = items; let first = items; } else { first = cResult[0]; } noop.useRef(first); if (cResult[1] !== arg0) { const fn = function s() { let tmp2 = null != closure_0; if (tmp2) { tmp2 = tmp.state !== GuildTemplateStates.RESOLVING; } if (tmp2) { const current = ref.current; if (!current.includes(tmp.code)) { const current1 = tmp4.current; current1.push(tmp.code); ({ code: obj2.guild_template_code, name: obj2.guild_template_name, description: obj2.guild_template_description, sourceGuildId: obj2.guild_template_guild_id } = tmp); AnalyticsUtilsDefault.track(AnalyticEvents.CREATE_GUILD_VIEWED, { guild_template_code: null, guild_template_name: null, guild_template_description: null, guild_template_guild_id: null }); const obj3 = { guild_template_code: null, guild_template_name: null, guild_template_description: null, guild_template_guild_id: null }; } tmp4 = ref; } }; cResult[1] = arg0; cResult[2] = fn; let tmp3 = fn; } else { tmp3 = cResult[2]; } const effect = noop.useEffect(tmp3); }) : ((arg0) => { closure_0 = arg0; noop.useRef([]); const effect = noop.useEffect(() => { let tmp2 = null != closure_0; if (tmp2) { tmp2 = tmp.state !== GuildTemplateStates.RESOLVING; } if (tmp2) { const current = ref.current; if (!current.includes(tmp.code)) { const current1 = tmp4.current; current1.push(tmp.code); ({ code: obj2.guild_template_code, name: obj2.guild_template_name, description: obj2.guild_template_description, sourceGuildId: obj2.guild_template_guild_id } = tmp); AnalyticsUtilsDefault.track(AnalyticEvents.CREATE_GUILD_VIEWED, { guild_template_code: null, guild_template_name: null, guild_template_description: null, guild_template_guild_id: null }); const obj3 = { guild_template_code: null, guild_template_name: null, guild_template_description: null, guild_template_guild_id: null }; } tmp4 = ref; } }); });