2026-09-28 16:18:32 +00:00
|
|
|
// Module ID: 6546
|
|
|
|
|
// Function ID: 6547
|
2026-09-18 19:45:33 +00:00
|
|
|
// Name: usePromptHelpText
|
2026-09-28 16:18:32 +00:00
|
|
|
// Dependencies: [2045, 2102, 4469, 4479, 1372, 1074, 1115, 504, 4989, 2]
|
2026-09-26 17:57:22 +00:00
|
|
|
// Exports: default, useCustomizeCommunityPromptHelpText
|
2026-09-18 19:45:33 +00:00
|
|
|
|
2026-09-28 16:18:32 +00:00
|
|
|
// Module 6546 (usePromptHelpText)
|
2026-10-01 14:13:23 +00:00
|
|
|
import Constants from "Constants" /* 1074 */;
|
2026-09-28 16:18:32 +00:00
|
|
|
import ChannelStore from "ChannelStore" /* 2045 */;
|
|
|
|
|
import GuildRoleStore from "GuildRoleStore" /* 2102 */;
|
|
|
|
|
import PermissionStore from "PermissionStore" /* 4469 */;
|
|
|
|
|
import RelationshipStore from "RelationshipStore" /* 4479 */;
|
2026-09-26 17:57:22 +00:00
|
|
|
import UserStore from "UserStore" /* 1372 */;
|
2026-10-01 14:13:23 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
2026-09-18 19:45:33 +00:00
|
|
|
|
2026-10-01 14:13:23 +00:00
|
|
|
const Permissions = Constants.Permissions;
|
2026-09-26 17:57:22 +00:00
|
|
|
const result = size.fileFinishedImporting("modules/guild_onboarding/usePromptHelpText.tsx");
|
|
|
|
|
|
|
|
|
|
export default function usePromptHelpText(arg0) {
|
2026-10-01 14:13:23 +00:00
|
|
|
let _prompt;
|
|
|
|
|
let guild;
|
|
|
|
|
let itemHook;
|
|
|
|
|
let selectedRoleIds;
|
|
|
|
|
let str2;
|
2026-09-18 19:45:33 +00:00
|
|
|
({ guild, prompt: _prompt, selectedRoleIds } = arg0);
|
|
|
|
|
({ selectedChannelIds: dependencyMap, itemHook } = arg0);
|
|
|
|
|
let id;
|
|
|
|
|
if (guild != null) {
|
|
|
|
|
id = guild.id;
|
|
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
let obj = selectedRoleIds(504);
|
2026-09-18 19:45:33 +00:00
|
|
|
const items = [GuildRoleStore];
|
|
|
|
|
const items1 = [id, selectedRoleIds];
|
2026-10-01 14:13:23 +00:00
|
|
|
const stateFromStoresArray = obj.useStateFromStoresArray(items, () => {
|
|
|
|
|
let manyRoles;
|
2026-09-18 19:45:33 +00:00
|
|
|
if (null != id) {
|
2026-10-01 14:13:23 +00:00
|
|
|
manyRoles = GuildRoleStore.getManyRoles(tmp, selectedRoleIds);
|
2026-09-18 19:45:33 +00:00
|
|
|
} else {
|
|
|
|
|
manyRoles = [];
|
|
|
|
|
}
|
|
|
|
|
return manyRoles;
|
|
|
|
|
}, items1);
|
|
|
|
|
const items2 = [id, UserStore, RelationshipStore, PermissionStore];
|
2026-10-01 14:13:23 +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));
|
2026-09-18 19:45:33 +00:00
|
|
|
const found = mapped.filter((item) => {
|
2026-10-01 14:13:23 +00:00
|
|
|
const canResult = null != item && closure_1_4.can(constants.VIEW_CHANNEL, item);
|
2026-09-18 19:45:33 +00:00
|
|
|
return canResult;
|
|
|
|
|
});
|
2026-10-01 14:13:23 +00:00
|
|
|
return found.map((item) => {
|
|
|
|
|
const obj = selectedRoleIds(closure_1_1[8]);
|
|
|
|
|
return obj.computeChannelName(item, closure_1_6, closure_1_5, true);
|
|
|
|
|
});
|
2026-09-18 19:45:33 +00:00
|
|
|
});
|
|
|
|
|
let mapped = stateFromStoresArray.map((name) => "@" + name.name);
|
|
|
|
|
let singleSelect;
|
|
|
|
|
if (_prompt != null) {
|
|
|
|
|
singleSelect = _prompt.singleSelect;
|
|
|
|
|
}
|
|
|
|
|
let str = "";
|
|
|
|
|
if (!singleSelect) {
|
2026-09-26 17:57:22 +00:00
|
|
|
const intl = tmp2(1115).intl;
|
|
|
|
|
str = intl.string(tmp2(1115).t.JshhEl);
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
|
|
|
|
if (0 === stateFromStoresArray1.length) {
|
|
|
|
|
if (mapped.length > 0) {
|
|
|
|
|
let str6 = "";
|
|
|
|
|
if (0 !== mapped.length) {
|
2026-09-26 17:57:22 +00:00
|
|
|
const intl4 = tmp2(1115).intl;
|
2026-10-01 14:13:23 +00:00
|
|
|
const format3 = intl4.format;
|
2026-09-18 19:45:33 +00:00
|
|
|
const _Math3 = Math;
|
2026-10-01 14:13:23 +00:00
|
|
|
const obj3 = { count: mapped.length, extraCount: Math.max(mapped.length - 2, 0), role1: null, role2: null, itemHook };
|
|
|
|
|
const Kj5GIT = tmp2(1115).t.Kj5GIT;
|
2026-09-18 19:45:33 +00:00
|
|
|
[obj6.role1, obj6.role2] = mapped;
|
2026-10-01 14:13:23 +00:00
|
|
|
str6 = format3(Kj5GIT, obj3);
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
|
|
|
|
str = str6;
|
2026-10-01 14:13:23 +00:00
|
|
|
str2 = "";
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
return { helpText: str, helpTextAdditional: str2 };
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
|
|
|
|
str2 = "";
|
|
|
|
|
if (stateFromStoresArray1.length > 0) {
|
|
|
|
|
let str3 = "";
|
|
|
|
|
if (0 !== stateFromStoresArray1.length) {
|
2026-09-26 17:57:22 +00:00
|
|
|
const intl2 = tmp2(1115).intl;
|
2026-10-01 14:13:23 +00:00
|
|
|
const format = intl2.format;
|
2026-09-18 19:45:33 +00:00
|
|
|
const _Math = Math;
|
2026-10-01 14:13:23 +00:00
|
|
|
const obj11 = { count: stateFromStoresArray1.length, extraCount: Math.max(stateFromStoresArray1.length - 2, 0), channel1: null, channel2: null, itemHook };
|
|
|
|
|
const Rj841R = tmp2(1115).t.Rj841R;
|
2026-09-18 19:45:33 +00:00
|
|
|
[obj4.channel1, obj4.channel2] = stateFromStoresArray1;
|
2026-10-01 14:13:23 +00:00
|
|
|
str3 = format(Rj841R, obj11);
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
|
|
|
|
let str4 = "";
|
|
|
|
|
if (mapped.length > 0) {
|
|
|
|
|
let str5 = "";
|
|
|
|
|
if (0 !== mapped.length) {
|
2026-09-26 17:57:22 +00:00
|
|
|
const intl3 = tmp2(1115).intl;
|
2026-10-01 14:13:23 +00:00
|
|
|
const format2 = intl3.format;
|
2026-09-18 19:45:33 +00:00
|
|
|
const _Math2 = Math;
|
2026-10-01 14:13:23 +00:00
|
|
|
const obj12 = { count: mapped.length, extraCount: Math.max(mapped.length - 2, 0), role1: null, role2: null, itemHook };
|
|
|
|
|
const cJZxWf = tmp2(1115).t.cJZxWf;
|
2026-09-18 19:45:33 +00:00
|
|
|
[obj5.role1, obj5.role2] = mapped;
|
2026-10-01 14:13:23 +00:00
|
|
|
str5 = format2(cJZxWf, obj12);
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
|
|
|
|
str4 = str5;
|
|
|
|
|
}
|
|
|
|
|
str2 = str4;
|
|
|
|
|
str = str3;
|
|
|
|
|
}
|
2026-09-26 17:57:22 +00:00
|
|
|
};
|
|
|
|
|
export const useCustomizeCommunityPromptHelpText = function useCustomizeCommunityPromptHelpText(arg0) {
|
2026-10-01 14:13:23 +00:00
|
|
|
let _prompt;
|
|
|
|
|
let guild;
|
|
|
|
|
let itemHook;
|
|
|
|
|
let selectedRoleIds;
|
2026-09-18 19:45:33 +00:00
|
|
|
({ guild, prompt: _prompt, selectedRoleIds } = arg0);
|
|
|
|
|
({ selectedChannelIds: dependencyMap, itemHook } = arg0);
|
|
|
|
|
let id;
|
|
|
|
|
if (guild != null) {
|
|
|
|
|
id = guild.id;
|
|
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
let obj = selectedRoleIds(504);
|
2026-09-18 19:45:33 +00:00
|
|
|
const items = [GuildRoleStore];
|
|
|
|
|
const items1 = [id, selectedRoleIds];
|
2026-10-01 14:13:23 +00:00
|
|
|
const stateFromStoresArray = obj.useStateFromStoresArray(items, () => {
|
|
|
|
|
let manyRoles;
|
2026-09-18 19:45:33 +00:00
|
|
|
if (null != id) {
|
2026-10-01 14:13:23 +00:00
|
|
|
manyRoles = GuildRoleStore.getManyRoles(tmp, selectedRoleIds);
|
2026-09-18 19:45:33 +00:00
|
|
|
} else {
|
|
|
|
|
manyRoles = [];
|
|
|
|
|
}
|
|
|
|
|
return manyRoles;
|
|
|
|
|
}, items1);
|
|
|
|
|
const items2 = [id, UserStore, RelationshipStore, PermissionStore];
|
2026-10-01 14:13:23 +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));
|
2026-09-18 19:45:33 +00:00
|
|
|
const found = mapped.filter((item) => {
|
2026-10-01 14:13:23 +00:00
|
|
|
const canResult = null != item && closure_1_4.can(constants.VIEW_CHANNEL, item);
|
2026-09-18 19:45:33 +00:00
|
|
|
return canResult;
|
|
|
|
|
});
|
2026-10-01 14:13:23 +00:00
|
|
|
return found.map((item) => {
|
|
|
|
|
const obj = selectedRoleIds(closure_1_1[8]);
|
|
|
|
|
return obj.computeChannelName(item, closure_1_6, closure_1_5, true);
|
|
|
|
|
});
|
2026-09-18 19:45:33 +00:00
|
|
|
});
|
|
|
|
|
let mapped = stateFromStoresArray.map((name) => "@" + name.name);
|
|
|
|
|
let singleSelect;
|
|
|
|
|
if (_prompt != null) {
|
|
|
|
|
singleSelect = _prompt.singleSelect;
|
|
|
|
|
}
|
|
|
|
|
let str = "";
|
|
|
|
|
if (!singleSelect) {
|
2026-09-26 17:57:22 +00:00
|
|
|
const intl = tmp2(1115).intl;
|
|
|
|
|
str = intl.string(tmp2(1115).t.JshhEl);
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
|
|
|
|
if (0 === stateFromStoresArray1.length) {
|
|
|
|
|
if (mapped.length > 0) {
|
2026-09-26 17:57:22 +00:00
|
|
|
const intl4 = tmp2(1115).intl;
|
2026-10-01 14:13:23 +00:00
|
|
|
const format3 = intl4.format;
|
2026-09-18 19:45:33 +00:00
|
|
|
const _Math4 = Math;
|
2026-10-01 14:13:23 +00:00
|
|
|
const obj6 = { count: mapped.length, extraCount: Math.max(mapped.length - 2, 0), role1: null, role2: null, itemHook };
|
|
|
|
|
const vdtNYa = tmp2(1115).t.vdtNYa;
|
2026-09-18 19:45:33 +00:00
|
|
|
[obj5.role1, obj5.role2] = mapped;
|
2026-10-01 14:13:23 +00:00
|
|
|
str = format3(vdtNYa, obj6);
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
return { helpText: str, helpTextAdditional: "" };
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
|
|
|
|
if (stateFromStoresArray1.length > 0) {
|
|
|
|
|
if (0 === mapped.length) {
|
2026-09-26 17:57:22 +00:00
|
|
|
const intl3 = tmp2(1115).intl;
|
2026-10-01 14:13:23 +00:00
|
|
|
const format2 = intl3.format;
|
2026-09-18 19:45:33 +00:00
|
|
|
const _Math3 = Math;
|
2026-10-01 14:13:23 +00:00
|
|
|
const obj11 = { count: stateFromStoresArray1.length, extraCount: Math.max(stateFromStoresArray1.length - 2, 0), channel1: null, channel2: null, itemHook };
|
|
|
|
|
const ZKywGU = tmp2(1115).t.ZKywGU;
|
2026-09-18 19:45:33 +00:00
|
|
|
[obj4.channel1, obj4.channel2] = stateFromStoresArray1;
|
2026-10-01 14:13:23 +00:00
|
|
|
str = format2(ZKywGU, obj11);
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
|
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
const tmp5 = stateFromStoresArray1.length > 0 && mapped.length > 0;
|
2026-09-18 19:45:33 +00:00
|
|
|
if (tmp5) {
|
2026-09-26 17:57:22 +00:00
|
|
|
const intl2 = tmp2(1115).intl;
|
2026-10-01 14:13:23 +00:00
|
|
|
const format = intl2.format;
|
2026-09-18 19:45:33 +00:00
|
|
|
const _Math = Math;
|
2026-10-01 14:13:23 +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(1115).t.WewRHM;
|
2026-09-18 19:45:33 +00:00
|
|
|
[obj3.channel1, obj3.channel2] = stateFromStoresArray1;
|
|
|
|
|
const _Math2 = Math;
|
|
|
|
|
[obj3.role1, obj3.role2] = mapped;
|
2026-10-01 14:13:23 +00:00
|
|
|
str = format(WewRHM, obj12);
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
2026-09-26 17:57:22 +00:00
|
|
|
};
|