decord/alpha/source/modules/guild_onboarding/usePromptHelpText.tsx

638 lines
20 KiB
TypeScript
Raw Permalink Normal View History

2026-10-12 06:59:38 +00:00
// Module ID: 6815
// Function ID: 6816
2026-07-29 08:29:29 +00:00
// Name: usePromptHelpText
2026-10-10 08:08:14 +00:00
// Dependencies: [2065, 2119, 4750, 4760, 1390, 1085, 1126, 558, 576, 504, 5421, 2]
2026-07-20 16:05:17 +00:00
2026-10-12 06:59:38 +00:00
// Module 6815 (usePromptHelpText)
2026-10-03 08:58:59 +00:00
import Constants from "Constants" /* 1085 */;
2026-10-10 08:08:14 +00:00
import ChannelStore from "ChannelStore" /* 2065 */;
import GuildRoleStore from "GuildRoleStore" /* 2119 */;
import PermissionStore from "PermissionStore" /* 4750 */;
import RelationshipStore from "RelationshipStore" /* 4760 */;
2026-10-09 10:00:15 +00:00
import UserStore from "UserStore" /* 1390 */;
2026-10-03 08:58:59 +00:00
import ReactCompilerGating_mod from "ReactCompilerGating" /* 558 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
2026-10-03 08:58:59 +00:00
const Permissions = Constants.Permissions;
let ReactCompilerGating = ReactCompilerGating_mod;
2026-10-08 09:57:35 +00:00
const tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function usePromptHelpText(selectedChannelIds) {
2026-10-03 08:58:59 +00:00
let _prompt;
let first;
let guild;
let selectedRoleIds;
const tmp = selectedRoleIds;
let obj = selectedRoleIds(selectedChannelIds[8]);
const cResult = obj.c(23);
({ guild, prompt: _prompt, selectedRoleIds } = selectedChannelIds);
selectedChannelIds = selectedChannelIds.selectedChannelIds;
const itemHook = selectedChannelIds.itemHook;
let id;
if (guild != null) {
id = guild.id;
}
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
const items = [GuildRoleStore];
cResult[0] = items;
first = items;
} else {
first = cResult[0];
}
if (cResult[1] === id) {
let tmp7;
let tmp8;
let tmp9;
let tmp14;
let tmp19;
2026-10-08 09:57:35 +00:00
let tmp22;
2026-10-03 08:58:59 +00:00
let tmp18;
let tmp17;
2026-10-08 09:57:35 +00:00
let str3;
2026-10-03 08:58:59 +00:00
if (cResult[2] === selectedRoleIds) {
tmp7 = cResult[3];
tmp8 = cResult[4];
}
const tmpResult = tmp(selectedChannelIds[9]);
const stateFromStoresArray = tmpResult.useStateFromStoresArray(first, tmp7, tmp8);
const _Symbol = Symbol;
if (cResult[5] === Symbol.for("react.memo_cache_sentinel")) {
const items1 = [id, UserStore, RelationshipStore, PermissionStore];
cResult[5] = items1;
tmp9 = items1;
} else {
tmp9 = cResult[5];
}
if (cResult[6] !== selectedChannelIds) {
const fn2 = function v() {
let channel;
const arr = Array.from(selectedChannelIds);
const mapped = arr.map((item) => channel.getChannel(item));
const found = mapped.filter((item) => {
const canResult = null != item && closure_1_4.can(constants.VIEW_CHANNEL, item);
return canResult;
});
return found.map((item) => {
const obj = selectedRoleIds(selectedChannelIds[10]);
return obj.computeChannelName(item, closure_1_6, closure_1_5, true);
});
};
cResult[6] = selectedChannelIds;
cResult[7] = fn2;
tmp14 = fn2;
} else {
tmp14 = cResult[7];
}
const tmpResult2 = tmp(selectedChannelIds[9]);
const stateFromStoresArray1 = tmpResult2.useStateFromStoresArray(tmp9, tmp14);
if (cResult[8] === itemHook) {
let singleSelect;
const tmp15 = cResult[9];
if (_prompt != null) {
singleSelect = _prompt.singleSelect;
}
if (tmp15 === singleSelect) {
if (cResult[10] === stateFromStoresArray1) {
if (cResult[11] === stateFromStoresArray) {
tmp17 = cResult[12];
tmp18 = cResult[13];
}
if (cResult[20] === tmp17) {
2026-10-08 09:57:35 +00:00
let tmp28;
2026-10-03 08:58:59 +00:00
if (cResult[21] === tmp18) {
2026-10-08 09:57:35 +00:00
tmp28 = cResult[22];
2026-10-03 08:58:59 +00:00
}
2026-10-08 09:57:35 +00:00
return tmp28;
2026-10-03 08:58:59 +00:00
}
const obj2 = { helpText: tmp17, helpTextAdditional: tmp18 };
cResult[20] = tmp17;
cResult[21] = tmp18;
cResult[22] = obj2;
2026-10-08 09:57:35 +00:00
tmp28 = obj2;
2026-10-03 08:58:59 +00:00
}
}
}
const _Symbol2 = Symbol;
if (cResult[14] === Symbol.for("react.memo_cache_sentinel")) {
2026-10-08 09:57:35 +00:00
const fn3 = function k(name) {
return "@" + name.name;
};
cResult[14] = fn3;
tmp19 = fn3;
2026-10-03 08:58:59 +00:00
} else {
2026-10-08 09:57:35 +00:00
tmp19 = cResult[14];
2026-10-03 08:58:59 +00:00
}
let mapped = stateFromStoresArray.map(tmp19);
2026-10-08 09:57:35 +00:00
let singleSelect1;
const tmp20 = cResult[15];
2026-10-03 08:58:59 +00:00
if (_prompt != null) {
2026-10-08 09:57:35 +00:00
singleSelect1 = _prompt.singleSelect;
2026-10-03 08:58:59 +00:00
}
2026-10-08 09:57:35 +00:00
if (tmp20 !== singleSelect1) {
let singleSelect2;
2026-10-03 08:58:59 +00:00
if (_prompt != null) {
2026-10-08 09:57:35 +00:00
singleSelect2 = _prompt.singleSelect;
2026-10-03 08:58:59 +00:00
}
let str = "";
2026-10-08 09:57:35 +00:00
if (!singleSelect2) {
const intl = tmp(tmp2[6]).intl;
str = intl.string(tmp(tmp2[6]).t.JshhEl);
2026-10-03 08:58:59 +00:00
}
2026-10-08 09:57:35 +00:00
let singleSelect3;
2026-10-03 08:58:59 +00:00
if (_prompt != null) {
2026-10-08 09:57:35 +00:00
singleSelect3 = _prompt.singleSelect;
2026-10-03 08:58:59 +00:00
}
2026-10-08 09:57:35 +00:00
cResult[15] = singleSelect3;
2026-10-03 08:58:59 +00:00
cResult[16] = str;
2026-10-08 09:57:35 +00:00
tmp22 = str;
2026-10-03 08:58:59 +00:00
} else {
2026-10-08 09:57:35 +00:00
tmp22 = cResult[16];
2026-10-03 08:58:59 +00:00
}
if (0 === stateFromStoresArray1.length) {
2026-10-08 09:57:35 +00:00
if (mapped.length > 0) {
let str5 = "";
if (0 !== mapped.length) {
const intl4 = tmp(tmp2[6]).intl;
const format3 = intl4.format;
const _Math3 = Math;
const obj3 = { count: mapped.length, extraCount: Math.max(mapped.length - 2, 0), role1: null, role2: null, itemHook };
const Kj5GIT = tmp(tmp2[6]).t.Kj5GIT;
[obj6.role1, obj6.role2] = mapped;
str5 = format3(Kj5GIT, obj3);
2026-10-03 08:58:59 +00:00
}
2026-10-08 09:57:35 +00:00
tmp22 = str5;
str3 = "";
2026-10-03 08:58:59 +00:00
}
cResult[8] = itemHook;
2026-10-08 09:57:35 +00:00
let singleSelect4;
2026-10-03 08:58:59 +00:00
if (_prompt != null) {
2026-10-08 09:57:35 +00:00
singleSelect4 = _prompt.singleSelect;
2026-10-03 08:58:59 +00:00
}
2026-10-08 09:57:35 +00:00
cResult[9] = singleSelect4;
2026-10-03 08:58:59 +00:00
cResult[10] = stateFromStoresArray1;
cResult[11] = stateFromStoresArray;
2026-10-08 09:57:35 +00:00
cResult[12] = tmp22;
2026-10-03 08:58:59 +00:00
cResult[13] = str3;
tmp18 = str3;
2026-10-08 09:57:35 +00:00
tmp17 = tmp22;
2026-10-03 08:58:59 +00:00
}
2026-10-08 09:57:35 +00:00
let str2 = "";
str3 = "";
2026-10-03 08:58:59 +00:00
if (stateFromStoresArray1.length > 0) {
2026-10-08 09:57:35 +00:00
if (cResult[17] === itemHook) {
let tmp25;
if (cResult[18] === stateFromStoresArray1) {
tmp25 = cResult[19];
}
str3 = str2;
tmp22 = tmp25;
if (mapped.length > 0) {
if (0 !== mapped.length) {
const intl3 = tmp(tmp2[6]).intl;
const format2 = intl3.format;
const _Math2 = Math;
const obj7 = { count: mapped.length, extraCount: Math.max(mapped.length - 2, 0), role1: null, role2: null, itemHook };
const cJZxWf = tmp(tmp2[6]).t.cJZxWf;
[obj5.role1, obj5.role2] = mapped;
str2 = format2(cJZxWf, obj7);
}
str3 = str2;
tmp22 = tmp25;
2026-10-03 08:58:59 +00:00
}
}
let formatResult = str2;
if (0 !== stateFromStoresArray1.length) {
2026-10-08 09:57:35 +00:00
const intl2 = tmp(tmp2[6]).intl;
const format = intl2.format;
2026-10-03 08:58:59 +00:00
const _Math = Math;
2026-10-08 09:57:35 +00:00
const obj11 = { count: stateFromStoresArray1.length, extraCount: Math.max(stateFromStoresArray1.length - 2, 0), channel1: null, channel2: null, itemHook };
2026-10-03 08:58:59 +00:00
const Rj841R = tmp(tmp2[6]).t.Rj841R;
2026-10-08 09:57:35 +00:00
[obj4.channel1, obj4.channel2] = stateFromStoresArray1;
formatResult = format(Rj841R, obj11);
2026-10-03 08:58:59 +00:00
}
cResult[17] = itemHook;
cResult[18] = stateFromStoresArray1;
cResult[19] = formatResult;
2026-10-08 09:57:35 +00:00
tmp25 = formatResult;
2026-10-03 08:58:59 +00:00
}
}
2026-10-08 09:57:35 +00:00
const fn = function p() {
2026-10-03 08:58:59 +00:00
let manyRoles;
if (null != id) {
manyRoles = GuildRoleStore.getManyRoles(tmp, selectedRoleIds);
} else {
manyRoles = [];
}
return manyRoles;
};
const items2 = [id, selectedRoleIds];
cResult[1] = id;
cResult[2] = selectedRoleIds;
cResult[3] = fn;
cResult[4] = items2;
tmp8 = items2;
tmp7 = fn;
2026-10-08 09:57:35 +00:00
}) : (function usePromptHelpText(arg0) {
2026-10-03 08:58:59 +00:00
let _prompt;
let guild;
let itemHook;
let selectedRoleIds;
let str2;
2026-07-20 16:05:17 +00:00
({ guild, prompt: _prompt, selectedRoleIds } = arg0);
2026-07-23 10:11:24 +00:00
({ selectedChannelIds: dependencyMap, itemHook } = arg0);
2026-07-20 16:05:17 +00:00
let id;
2026-07-29 08:29:29 +00:00
if (guild != null) {
2026-07-20 16:05:17 +00:00
id = guild.id;
}
2026-10-03 08:58:59 +00:00
let obj = selectedRoleIds(504);
const items = [GuildRoleStore];
2026-07-20 16:05:17 +00:00
const items1 = [id, selectedRoleIds];
2026-10-03 08:58:59 +00:00
const stateFromStoresArray = obj.useStateFromStoresArray(items, () => {
let manyRoles;
2026-07-20 16:05:17 +00:00
if (null != id) {
2026-10-03 08:58:59 +00:00
manyRoles = GuildRoleStore.getManyRoles(tmp, selectedRoleIds);
2026-07-20 16:05:17 +00:00
} else {
manyRoles = [];
}
return manyRoles;
}, items1);
const items2 = [id, UserStore, RelationshipStore, PermissionStore];
2026-10-03 08:58:59 +00:00
const obj2 = selectedRoleIds(504);
const stateFromStoresArray1 = obj2.useStateFromStoresArray(items2, () => {
let channel;
const arr = Array.from(dependencyMap);
const mapped = arr.map((item) => channel.getChannel(item));
const found = mapped.filter((item) => {
2026-10-03 08:58:59 +00:00
const canResult = null != item && closure_1_4.can(constants.VIEW_CHANNEL, item);
2026-07-20 16:05:17 +00:00
return canResult;
});
2026-10-03 08:58:59 +00:00
return found.map((item) => {
const obj = selectedRoleIds(closure_1_1[10]);
return obj.computeChannelName(item, closure_1_6, closure_1_5, true);
});
2026-07-20 16:05:17 +00:00
});
2026-07-23 10:11:24 +00:00
let mapped = stateFromStoresArray.map((name) => "@" + name.name);
2026-07-29 08:29:29 +00:00
let singleSelect;
if (_prompt != null) {
singleSelect = _prompt.singleSelect;
}
let str = "";
if (!singleSelect) {
2026-10-03 08:58:59 +00:00
const intl = tmp2(1126).intl;
str = intl.string(tmp2(1126).t.JshhEl);
2026-07-20 16:05:17 +00:00
}
if (0 === stateFromStoresArray1.length) {
if (mapped.length > 0) {
2026-07-29 08:29:29 +00:00
let str6 = "";
if (0 !== mapped.length) {
2026-10-03 08:58:59 +00:00
const intl4 = tmp2(1126).intl;
const format3 = intl4.format;
2026-07-29 08:29:29 +00:00
const _Math3 = Math;
2026-10-03 08:58:59 +00:00
const obj3 = { count: mapped.length, extraCount: Math.max(mapped.length - 2, 0), role1: null, role2: null, itemHook };
const Kj5GIT = tmp2(1126).t.Kj5GIT;
[obj6.role1, obj6.role2] = mapped;
2026-10-03 08:58:59 +00:00
str6 = format3(Kj5GIT, obj3);
2026-07-29 08:29:29 +00:00
}
str = str6;
2026-10-03 08:58:59 +00:00
str2 = "";
2026-07-20 16:05:17 +00:00
}
2026-10-03 08:58:59 +00:00
return { helpText: str, helpTextAdditional: str2 };
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
str2 = "";
2026-07-20 16:05:17 +00:00
if (stateFromStoresArray1.length > 0) {
2026-07-29 08:29:29 +00:00
let str3 = "";
2026-07-20 16:05:17 +00:00
if (0 !== stateFromStoresArray1.length) {
2026-10-03 08:58:59 +00:00
const intl2 = tmp2(1126).intl;
const format = intl2.format;
2026-07-20 16:05:17 +00:00
const _Math = Math;
2026-10-03 08:58:59 +00:00
const obj11 = { count: stateFromStoresArray1.length, extraCount: Math.max(stateFromStoresArray1.length - 2, 0), channel1: null, channel2: null, itemHook };
const Rj841R = tmp2(1126).t.Rj841R;
[obj4.channel1, obj4.channel2] = stateFromStoresArray1;
2026-10-03 08:58:59 +00:00
str3 = format(Rj841R, obj11);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let str4 = "";
2026-07-20 16:05:17 +00:00
if (mapped.length > 0) {
2026-07-29 08:29:29 +00:00
let str5 = "";
if (0 !== mapped.length) {
2026-10-03 08:58:59 +00:00
const intl3 = tmp2(1126).intl;
const format2 = intl3.format;
2026-07-29 08:29:29 +00:00
const _Math2 = Math;
2026-10-03 08:58:59 +00:00
const obj12 = { count: mapped.length, extraCount: Math.max(mapped.length - 2, 0), role1: null, role2: null, itemHook };
const cJZxWf = tmp2(1126).t.cJZxWf;
[obj5.role1, obj5.role2] = mapped;
2026-10-03 08:58:59 +00:00
str5 = format2(cJZxWf, obj12);
2026-07-29 08:29:29 +00:00
}
str4 = str5;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
str2 = str4;
str = str3;
2026-07-20 16:05:17 +00:00
}
2026-10-03 08:58:59 +00:00
});
ReactCompilerGating = ReactCompilerGating_mod;
2026-10-08 09:57:35 +00:00
const tmp3 = ReactCompilerGating.isReactCompilerEnabled() ? (function useCustomizeCommunityPromptHelpText(selectedChannelIds) {
2026-10-03 08:58:59 +00:00
let _prompt;
let first;
let guild;
let selectedRoleIds;
const tmp = selectedRoleIds;
let obj = selectedRoleIds(selectedChannelIds[8]);
const cResult = obj.c(25);
({ guild, prompt: _prompt, selectedRoleIds } = selectedChannelIds);
selectedChannelIds = selectedChannelIds.selectedChannelIds;
const itemHook = selectedChannelIds.itemHook;
let id;
if (guild != null) {
id = guild.id;
}
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
const items = [GuildRoleStore];
cResult[0] = items;
first = items;
} else {
first = cResult[0];
}
if (cResult[1] === id) {
let tmp7;
let tmp8;
let tmp9;
let tmp14;
let tmp18;
2026-10-08 09:57:35 +00:00
let formatResult;
2026-10-03 08:58:59 +00:00
let tmp17;
if (cResult[2] === selectedRoleIds) {
tmp7 = cResult[3];
tmp8 = cResult[4];
}
const tmpResult = tmp(selectedChannelIds[9]);
const stateFromStoresArray = tmpResult.useStateFromStoresArray(first, tmp7, tmp8);
const _Symbol = Symbol;
if (cResult[5] === Symbol.for("react.memo_cache_sentinel")) {
const items1 = [id, UserStore, RelationshipStore, PermissionStore];
cResult[5] = items1;
tmp9 = items1;
} else {
tmp9 = cResult[5];
}
if (cResult[6] !== selectedChannelIds) {
const fn2 = function v() {
let channel;
const arr = Array.from(selectedChannelIds);
const mapped = arr.map((item) => channel.getChannel(item));
const found = mapped.filter((item) => {
const canResult = null != item && closure_1_4.can(constants.VIEW_CHANNEL, item);
return canResult;
});
return found.map((item) => {
const obj = selectedRoleIds(selectedChannelIds[10]);
return obj.computeChannelName(item, closure_1_6, closure_1_5, true);
});
};
cResult[6] = selectedChannelIds;
cResult[7] = fn2;
tmp14 = fn2;
} else {
tmp14 = cResult[7];
}
const tmpResult2 = tmp(selectedChannelIds[9]);
const stateFromStoresArray1 = tmpResult2.useStateFromStoresArray(tmp9, tmp14);
if (cResult[8] === itemHook) {
let singleSelect;
const tmp15 = cResult[9];
if (_prompt != null) {
singleSelect = _prompt.singleSelect;
}
if (tmp15 === singleSelect) {
if (cResult[10] === stateFromStoresArray1[0]) {
if (cResult[11] === stateFromStoresArray1[1]) {
if (cResult[12] === stateFromStoresArray1.length) {
2026-10-08 09:57:35 +00:00
let tmp27;
2026-10-03 08:58:59 +00:00
if (cResult[13] === stateFromStoresArray) {
tmp17 = cResult[14];
}
if (cResult[23] !== tmp17) {
const obj2 = { helpText: tmp17, helpTextAdditional: "" };
cResult[23] = tmp17;
cResult[24] = obj2;
2026-10-08 09:57:35 +00:00
tmp27 = obj2;
2026-10-03 08:58:59 +00:00
} else {
2026-10-08 09:57:35 +00:00
tmp27 = cResult[24];
2026-10-03 08:58:59 +00:00
}
2026-10-08 09:57:35 +00:00
return tmp27;
2026-10-03 08:58:59 +00:00
}
}
}
}
}
const _Symbol2 = Symbol;
if (cResult[15] === Symbol.for("react.memo_cache_sentinel")) {
2026-10-08 09:57:35 +00:00
class N {
constructor(name) {
return "@" + name.name;
}
}
cResult[15] = N;
tmp18 = N;
2026-10-03 08:58:59 +00:00
} else {
2026-10-08 09:57:35 +00:00
class N {
constructor(name) {
return "@" + name.name;
}
}
2026-10-03 08:58:59 +00:00
}
let mapped = stateFromStoresArray.map(tmp18);
const tmp19 = cResult[16];
if (_prompt != null) {
2026-10-08 09:57:35 +00:00
class N {
constructor(name) {
return "@" + name.name;
}
}
2026-10-03 08:58:59 +00:00
}
2026-10-08 09:57:35 +00:00
if (tmp19 !== undefined) {
class N {
constructor(name) {
return "@" + name.name;
}
}
2026-10-03 08:58:59 +00:00
if (_prompt != null) {
2026-10-08 09:57:35 +00:00
class N {
constructor(name) {
return "@" + name.name;
}
}
2026-10-03 08:58:59 +00:00
}
let str = "";
2026-10-08 09:57:35 +00:00
if (!tmp22) {
class N {
constructor(name) {
return "@" + name.name;
}
}
str = obj4.string(tmp(tmp2[6]).t.JshhEl);
2026-10-03 08:58:59 +00:00
}
if (_prompt != null) {
2026-10-08 09:57:35 +00:00
class N {
constructor(name) {
return "@" + name.name;
}
}
2026-10-03 08:58:59 +00:00
}
2026-10-08 09:57:35 +00:00
cResult[16] = undefined;
2026-10-03 08:58:59 +00:00
cResult[17] = str;
2026-10-08 09:57:35 +00:00
formatResult = str;
2026-10-03 08:58:59 +00:00
} else {
2026-10-08 09:57:35 +00:00
class N {
constructor(name) {
return "@" + name.name;
}
}
2026-10-03 08:58:59 +00:00
}
if (0 === stateFromStoresArray1.length) {
2026-10-08 09:57:35 +00:00
class N {
constructor(name) {
return "@" + name.name;
}
2026-10-03 08:58:59 +00:00
}
cResult[8] = itemHook;
if (_prompt != null) {
2026-10-08 09:57:35 +00:00
class N {
constructor(name) {
return "@" + name.name;
}
}
2026-10-03 08:58:59 +00:00
}
2026-10-08 09:57:35 +00:00
cResult[9] = undefined;
2026-10-03 08:58:59 +00:00
cResult[10] = stateFromStoresArray1[0];
cResult[11] = stateFromStoresArray1[1];
cResult[12] = stateFromStoresArray1.length;
cResult[13] = stateFromStoresArray;
2026-10-08 09:57:35 +00:00
cResult[14] = formatResult;
tmp17 = formatResult;
2026-10-03 08:58:59 +00:00
}
if (stateFromStoresArray1.length > 0) {
2026-10-08 09:57:35 +00:00
class N {
constructor(name) {
return "@" + name.name;
2026-10-03 08:58:59 +00:00
}
}
}
const tmp24 = stateFromStoresArray1.length > 0 && mapped.length > 0;
if (tmp24) {
2026-10-08 09:57:35 +00:00
class N {
constructor(name) {
return "@" + name.name;
}
}
const format = tmp25.format;
2026-10-03 08:58:59 +00:00
const _Math = Math;
2026-10-08 09:57:35 +00:00
const obj3 = { channelCount: stateFromStoresArray1.length, extraChannelCount: Math.max(stateFromStoresArray1.length - 2, 0), channel1: null, channel2: null, itemHook, roleCount: mapped.length, extraRoleCount: Math.max(mapped.length - 2, 0), role1: null, role2: null };
2026-10-03 08:58:59 +00:00
const WewRHM = tmp(tmp2[6]).t.WewRHM;
2026-10-08 09:57:35 +00:00
[obj5.channel1, obj5.channel2] = stateFromStoresArray1;
2026-10-03 08:58:59 +00:00
const _Math2 = Math;
2026-10-08 09:57:35 +00:00
[obj5.role1, obj5.role2] = mapped;
formatResult = format(WewRHM, obj3);
2026-10-03 08:58:59 +00:00
}
}
2026-10-08 09:57:35 +00:00
const fn = function p() {
2026-10-03 08:58:59 +00:00
let manyRoles;
if (null != id) {
manyRoles = GuildRoleStore.getManyRoles(tmp, selectedRoleIds);
} else {
manyRoles = [];
}
return manyRoles;
};
const items2 = [id, selectedRoleIds];
cResult[1] = id;
cResult[2] = selectedRoleIds;
cResult[3] = fn;
cResult[4] = items2;
tmp8 = items2;
tmp7 = fn;
2026-10-08 09:57:35 +00:00
}) : (function useCustomizeCommunityPromptHelpText(arg0) {
2026-10-03 08:58:59 +00:00
let _prompt;
let guild;
let itemHook;
let selectedRoleIds;
2026-07-20 16:05:17 +00:00
({ guild, prompt: _prompt, selectedRoleIds } = arg0);
2026-07-23 10:11:24 +00:00
({ selectedChannelIds: dependencyMap, itemHook } = arg0);
2026-07-20 16:05:17 +00:00
let id;
2026-07-29 08:29:29 +00:00
if (guild != null) {
2026-07-20 16:05:17 +00:00
id = guild.id;
}
2026-10-03 08:58:59 +00:00
let obj = selectedRoleIds(504);
const items = [GuildRoleStore];
2026-07-20 16:05:17 +00:00
const items1 = [id, selectedRoleIds];
2026-10-03 08:58:59 +00:00
const stateFromStoresArray = obj.useStateFromStoresArray(items, () => {
let manyRoles;
2026-07-20 16:05:17 +00:00
if (null != id) {
2026-10-03 08:58:59 +00:00
manyRoles = GuildRoleStore.getManyRoles(tmp, selectedRoleIds);
2026-07-20 16:05:17 +00:00
} else {
manyRoles = [];
}
return manyRoles;
}, items1);
const items2 = [id, UserStore, RelationshipStore, PermissionStore];
2026-10-03 08:58:59 +00:00
const obj2 = selectedRoleIds(504);
const stateFromStoresArray1 = obj2.useStateFromStoresArray(items2, () => {
let channel;
const arr = Array.from(dependencyMap);
const mapped = arr.map((item) => channel.getChannel(item));
const found = mapped.filter((item) => {
2026-10-03 08:58:59 +00:00
const canResult = null != item && closure_1_4.can(constants.VIEW_CHANNEL, item);
2026-07-20 16:05:17 +00:00
return canResult;
});
2026-10-03 08:58:59 +00:00
return found.map((item) => {
const obj = selectedRoleIds(closure_1_1[10]);
return obj.computeChannelName(item, closure_1_6, closure_1_5, true);
});
2026-07-20 16:05:17 +00:00
});
2026-07-23 10:11:24 +00:00
let mapped = stateFromStoresArray.map((name) => "@" + name.name);
2026-07-29 08:29:29 +00:00
let singleSelect;
if (_prompt != null) {
singleSelect = _prompt.singleSelect;
}
let str = "";
if (!singleSelect) {
2026-10-03 08:58:59 +00:00
const intl = tmp2(1126).intl;
str = intl.string(tmp2(1126).t.JshhEl);
2026-07-20 16:05:17 +00:00
}
if (0 === stateFromStoresArray1.length) {
if (mapped.length > 0) {
2026-10-03 08:58:59 +00:00
const intl4 = tmp2(1126).intl;
const format3 = intl4.format;
2026-07-20 16:05:17 +00:00
const _Math4 = Math;
2026-10-03 08:58:59 +00:00
const obj6 = { count: mapped.length, extraCount: Math.max(mapped.length - 2, 0), role1: null, role2: null, itemHook };
const vdtNYa = tmp2(1126).t.vdtNYa;
[obj5.role1, obj5.role2] = mapped;
2026-10-03 08:58:59 +00:00
str = format3(vdtNYa, obj6);
2026-07-20 16:05:17 +00:00
}
2026-10-03 08:58:59 +00:00
return { helpText: str, helpTextAdditional: "" };
2026-07-20 16:05:17 +00:00
}
if (stateFromStoresArray1.length > 0) {
if (0 === mapped.length) {
2026-10-03 08:58:59 +00:00
const intl3 = tmp2(1126).intl;
const format2 = intl3.format;
2026-07-20 16:05:17 +00:00
const _Math3 = Math;
2026-10-03 08:58:59 +00:00
const obj11 = { count: stateFromStoresArray1.length, extraCount: Math.max(stateFromStoresArray1.length - 2, 0), channel1: null, channel2: null, itemHook };
const ZKywGU = tmp2(1126).t.ZKywGU;
[obj4.channel1, obj4.channel2] = stateFromStoresArray1;
2026-10-03 08:58:59 +00:00
str = format2(ZKywGU, obj11);
2026-07-20 16:05:17 +00:00
}
}
2026-10-03 08:58:59 +00:00
const tmp5 = stateFromStoresArray1.length > 0 && mapped.length > 0;
2026-07-29 08:29:29 +00:00
if (tmp5) {
2026-10-03 08:58:59 +00:00
const intl2 = tmp2(1126).intl;
const format = intl2.format;
2026-07-20 16:05:17 +00:00
const _Math = Math;
2026-10-03 08:58:59 +00:00
const obj12 = { channelCount: stateFromStoresArray1.length, extraChannelCount: Math.max(stateFromStoresArray1.length - 2, 0), channel1: null, channel2: null, itemHook, roleCount: mapped.length, extraRoleCount: Math.max(mapped.length - 2, 0), role1: null, role2: null };
const WewRHM = tmp2(1126).t.WewRHM;
[obj3.channel1, obj3.channel2] = stateFromStoresArray1;
2026-07-20 16:05:17 +00:00
const _Math2 = Math;
[obj3.role1, obj3.role2] = mapped;
2026-10-03 08:58:59 +00:00
str = format(WewRHM, obj12);
2026-07-20 16:05:17 +00:00
}
2026-10-03 08:58:59 +00:00
});
const result = size.fileFinishedImporting("modules/guild_onboarding/usePromptHelpText.tsx");
export default tmp2;
export const useCustomizeCommunityPromptHelpText = tmp3;