decord/source/modules/guild_settings/native/GuildSettingsModalLanding.tsx

437 lines
17 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 16453
// Function ID: 16454
2026-07-29 08:29:29 +00:00
// Name: SettingsSection
2026-08-05 07:35:12 +00:00
// Dependencies: [19, 1932, 1862, 3883, 1874, 16454, 8916, 676, 21, 4449, 4255, 5300, 1236, 4211, 16455, 8207, 3888, 16457, 14078, 7548, 7599, 11024, 8918, 7623, 8900, 16459, 4199, 5634, 13739, 4768, 10426, 3959, 712, 1480, 589, 8915, 16460, 5774, 5781, 3955, 7749, 4663, 15776, 1416, 16461, 5581, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-05 07:35:12 +00:00
// Module 16453 (SettingsSection)
2026-07-29 08:29:29 +00:00
import ReactionIcon from "ReactionIcon";
import comparator from "comparator";
import createGuildRecordFromRust from "createGuildRecordFromRust";
import getUncachedChannelPermissions from "getUncachedChannelPermissions";
import mergeGuildAvatar from "mergeGuildAvatar";
import sortCategoryList from "sortCategoryList";
import handleFormInit from "handleFormInit";
2026-07-23 10:11:24 +00:00
import ME from "ME";
2026-07-29 08:29:29 +00:00
import jsxProd from "StampIcon";
import createCacheKey from "createCacheKey";
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
let closure_12;
let closure_14;
let closure_15;
let closure_16;
let closure_17;
2026-07-29 08:29:29 +00:00
let map1;
let unpackModuleId;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-20 16:05:17 +00:00
function SettingsSection(guild) {
let canConfigureOfficialMessages;
let canManageChannels;
let canManageGuild;
let canManageGuildExpressions;
let canManageWebhooks;
let canUnlinkChannelLobbies;
let canViewAuditLog;
let categories;
2026-07-23 10:11:24 +00:00
let importDefault;
2026-07-20 16:05:17 +00:00
let isGuildAdmin;
guild = guild.guild;
2026-07-23 10:11:24 +00:00
({ isGuildAdmin, canManageGuild, canManageChannels, pushScreen: importDefault } = guild);
2026-07-29 08:29:29 +00:00
const tmp2 = guild;
2026-07-20 16:05:17 +00:00
({ canManageGuildExpressions, canViewAuditLog, canManageWebhooks, canUnlinkChannelLobbies, canConfigureOfficialMessages, categories } = guild);
2026-07-29 08:29:29 +00:00
let obj = { label: null, arrow: true, icon: null, onPress: null };
const intl = guild(1236).intl;
obj[0] = intl.string(guild(1236).t["/dp6yY"]);
obj = { IconComponent: null };
2026-08-05 07:35:12 +00:00
obj[0] = guild(4211).CircleInformationIcon;
obj[2] = callback(guild(5300).TableRow.Icon, obj);
2026-07-29 08:29:29 +00:00
obj[3] = function onPress() {
2026-07-23 10:11:24 +00:00
return callback(outer1_12.OVERVIEW);
2026-07-20 16:05:17 +00:00
};
2026-08-05 07:35:12 +00:00
const items = [callback(guild(5300).TableRow, obj, "overview")];
2026-07-23 10:11:24 +00:00
currentUser = currentUser.getCurrentUser();
2026-07-20 16:05:17 +00:00
if (canManageGuild) {
2026-07-29 08:29:29 +00:00
obj = { label: null, arrow: true, icon: null, onPress: null };
const intl2 = tmp2(1236).intl;
obj[0] = intl2.string(tmp2(1236).t["5tbTdV"]);
const obj1 = { IconComponent: null };
2026-08-05 07:35:12 +00:00
obj1[0] = tmp2(16455).ModerationIcon;
obj[2] = tmp(tmp2(5300).TableRow.Icon, obj1);
2026-07-29 08:29:29 +00:00
obj[3] = function onPress() {
2026-07-23 10:11:24 +00:00
return callback(outer1_12.MODERATION);
2026-07-20 16:05:17 +00:00
};
2026-08-05 07:35:12 +00:00
items.push(tmp(tmp2(5300).TableRow, obj, "moderation"));
2026-07-20 16:05:17 +00:00
}
if (canViewAuditLog) {
2026-07-29 08:29:29 +00:00
const obj2 = { label: null, arrow: true, icon: null, onPress: null };
const intl3 = tmp2(1236).intl;
obj2[0] = intl3.string(tmp2(1236).t.SPWLyT);
const obj3 = { IconComponent: null };
2026-08-05 07:35:12 +00:00
obj3[0] = tmp2(8207).ClipboardListIcon;
obj2[2] = tmp(tmp2(5300).TableRow.Icon, obj3);
2026-07-29 08:29:29 +00:00
obj2[3] = function onPress() {
2026-07-23 10:11:24 +00:00
return callback(outer1_12.AUDIT_LOG);
2026-07-20 16:05:17 +00:00
};
2026-08-05 07:35:12 +00:00
items.push(tmp(tmp2(5300).TableRow, obj2, "auditlogs"));
2026-07-20 16:05:17 +00:00
}
if (!canManageChannels) {
let canManageACategoryResult = null != currentUser;
if (canManageACategoryResult) {
2026-08-05 07:35:12 +00:00
let obj6 = importAll(3888);
2026-07-20 16:05:17 +00:00
canManageACategoryResult = obj6.canManageACategory(currentUser, guild, categories);
}
canManageChannels = canManageACategoryResult;
}
if (canManageChannels) {
2026-07-29 08:29:29 +00:00
const obj4 = { label: null, arrow: true, icon: null, onPress: null };
const intl4 = tmp2(1236).intl;
obj4[0] = intl4.string(tmp2(1236).t.OGiMXJ);
const obj5 = { IconComponent: null };
2026-08-05 07:35:12 +00:00
obj5[0] = tmp2(16457).ChannelListIcon;
obj4[2] = tmp(tmp2(5300).TableRow.Icon, obj5);
2026-07-29 08:29:29 +00:00
obj4[3] = function onPress() {
2026-07-23 10:11:24 +00:00
guild = outer1_9.initGuild(guild.id);
callback(outer1_12.CHANNELS);
2026-07-20 16:05:17 +00:00
};
2026-08-05 07:35:12 +00:00
items.push(tmp(tmp2(5300).TableRow, obj4, "channels"));
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp11 = canManageGuild;
2026-07-20 16:05:17 +00:00
if (!canManageGuild) {
2026-07-29 08:29:29 +00:00
tmp11 = canManageWebhooks;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!tmp11) {
tmp11 = canUnlinkChannelLobbies;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp11) {
obj6 = { label: null, arrow: true, icon: null, onPress: null };
const intl5 = tmp2(1236).intl;
obj6[0] = intl5.string(tmp2(1236).t.CIsNZw);
const obj7 = { IconComponent: null };
2026-08-05 07:35:12 +00:00
obj7[0] = tmp2(14078).PuzzlePieceIcon;
obj6[2] = tmp(tmp2(5300).TableRow.Icon, obj7);
2026-07-29 08:29:29 +00:00
obj6[3] = function onPress() {
2026-07-23 10:11:24 +00:00
return callback(outer1_12.INTEGRATIONS);
2026-07-20 16:05:17 +00:00
};
2026-08-05 07:35:12 +00:00
items.push(tmp(tmp2(5300).TableRow, obj6, "integrations"));
2026-07-20 16:05:17 +00:00
}
if (canManageGuildExpressions) {
2026-07-29 08:29:29 +00:00
const obj8 = { label: null, arrow: true, icon: null, onPress: null };
const intl6 = tmp2(1236).intl;
obj8[0] = intl6.string(tmp2(1236).t.sMOuuS);
const obj9 = { IconComponent: null };
2026-08-05 07:35:12 +00:00
obj9[0] = tmp2(7548).ReactionIcon;
obj8[2] = tmp(tmp2(5300).TableRow.Icon, obj9);
2026-07-29 08:29:29 +00:00
obj8[3] = function onPress() {
2026-07-23 10:11:24 +00:00
return callback(outer1_12.EMOJI);
2026-07-20 16:05:17 +00:00
};
2026-08-05 07:35:12 +00:00
items.push(tmp(tmp2(5300).TableRow, obj8, "emoji"));
2026-07-29 08:29:29 +00:00
const obj10 = { label: null, arrow: true, icon: null, onPress: null };
const intl7 = tmp2(1236).intl;
obj10[0] = intl7.string(tmp2(1236).t.R5nQkS);
const obj11 = { IconComponent: null };
2026-08-05 07:35:12 +00:00
obj11[0] = tmp2(7599).StickerIcon;
obj10[2] = tmp(tmp2(5300).TableRow.Icon, obj11);
2026-07-29 08:29:29 +00:00
obj10[3] = function onPress() {
2026-07-23 10:11:24 +00:00
return callback(outer1_12.STICKERS);
2026-07-20 16:05:17 +00:00
};
2026-08-05 07:35:12 +00:00
items.push(tmp(tmp2(5300).TableRow, obj10, "stickers"));
2026-07-20 16:05:17 +00:00
}
if (canConfigureOfficialMessages) {
2026-07-29 08:29:29 +00:00
const obj12 = { label: null, arrow: true, icon: null, onPress: null };
const intl8 = tmp2(1236).intl;
obj12[0] = intl8.string(tmp2(1236).t.xHEzFh);
const obj13 = { IconComponent: null };
2026-08-05 07:35:12 +00:00
obj13[0] = tmp2(11024).StampIcon;
obj12[2] = tmp(tmp2(5300).TableRow.Icon, obj13);
2026-07-29 08:29:29 +00:00
obj12[3] = function onPress() {
2026-07-23 10:11:24 +00:00
return callback(outer1_12.OFFICIAL_MESSAGES);
2026-07-20 16:05:17 +00:00
};
2026-08-05 07:35:12 +00:00
items.push(tmp(tmp2(5300).TableRow, obj12, "official-messages"));
2026-07-20 16:05:17 +00:00
}
2026-08-05 07:35:12 +00:00
let tmp2Result = tmp2(8918);
2026-07-29 08:29:29 +00:00
if (tmp2Result.canUseMobileServerTagSettings(guild.id)) {
const obj14 = { label: null, arrow: true, icon: null, onPress: null };
const intl9 = tmp2(1236).intl;
obj14[0] = intl9.string(tmp2(1236).t["2QmKZ2"]);
const obj15 = { IconComponent: null };
2026-08-05 07:35:12 +00:00
obj15[0] = tmp2(7623).TagIcon;
obj14[2] = tmp(tmp2(5300).TableRow.Icon, obj15);
2026-07-29 08:29:29 +00:00
obj14[3] = function onPress() {
2026-07-23 10:11:24 +00:00
return callback(outer1_12.TAG);
2026-07-20 16:05:17 +00:00
};
2026-08-05 07:35:12 +00:00
items.push(tmp(tmp2(5300).TableRow, obj14, "server-tag"));
2026-07-20 16:05:17 +00:00
}
if (canManageGuild) {
2026-07-29 08:29:29 +00:00
const obj16 = { label: null, arrow: true, icon: null, onPress: null };
const intl10 = tmp2(1236).intl;
obj16[0] = intl10.string(tmp2(1236).t.Am9YHi);
const obj17 = { IconComponent: null };
2026-08-05 07:35:12 +00:00
obj17[0] = tmp2(8900).ShieldUserIcon;
obj16[2] = tmp(tmp2(5300).TableRow.Icon, obj17);
2026-07-29 08:29:29 +00:00
obj16[3] = function onPress() {
2026-07-23 10:11:24 +00:00
return callback(outer1_12.SECURITY);
2026-07-20 16:05:17 +00:00
};
2026-08-05 07:35:12 +00:00
items.push(tmp(tmp2(5300).TableRow, obj16, "security"));
2026-07-20 16:05:17 +00:00
}
if (isGuildAdmin) {
2026-08-05 07:35:12 +00:00
tmp2Result = tmp2(16459);
2026-07-29 08:29:29 +00:00
isGuildAdmin = tmp2Result.canSeeVanityUrlSettings(guild);
2026-07-20 16:05:17 +00:00
}
if (isGuildAdmin) {
2026-07-29 08:29:29 +00:00
const obj18 = { label: null, arrow: true, icon: null, onPress: null };
const intl11 = tmp2(1236).intl;
obj18[0] = intl11.string(tmp2(1236).t["5XZKy/"]);
const obj19 = { IconComponent: null };
2026-08-05 07:35:12 +00:00
obj19[0] = tmp2(4199).LinkIcon;
obj18[2] = tmp(tmp2(5300).TableRow.Icon, obj19);
2026-07-29 08:29:29 +00:00
obj18[3] = function onPress() {
2026-07-23 10:11:24 +00:00
return callback(outer1_12.VANITY_URL);
2026-07-20 16:05:17 +00:00
};
2026-08-05 07:35:12 +00:00
items.push(tmp(tmp2(5300).TableRow, obj18, "vanity"));
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let tmpResult = null;
2026-07-20 16:05:17 +00:00
if (0 !== items.length) {
2026-07-29 08:29:29 +00:00
const obj20 = { title: null, hasIcons: true, children: null };
const intl12 = tmp2(1236).intl;
obj20[0] = intl12.string(tmp2(1236).t["3D5yo/"]);
obj20[2] = items;
2026-08-05 07:35:12 +00:00
tmpResult = tmp(tmp2(5634).TableRowGroup, obj20);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmpResult;
2026-07-20 16:05:17 +00:00
}
function CommunitySection(pushScreen) {
2026-07-23 10:11:24 +00:00
pushScreen = pushScreen.pushScreen;
2026-07-20 16:05:17 +00:00
const features = pushScreen.guild.features;
const hasItem = features.has(constants.COMMUNITY);
2026-07-29 08:29:29 +00:00
let obj = { title: null, hasIcons: true, children: null };
const intl = pushScreen(1236).intl;
obj[0] = intl.string(pushScreen(1236).t["1g9A/f"]);
2026-08-05 07:35:12 +00:00
const TableRow = pushScreen(5300).TableRow;
2026-07-29 08:29:29 +00:00
obj = { label: null, arrow: true, icon: null, onPress: null };
const intl2 = pushScreen(1236).intl;
2026-07-20 16:05:17 +00:00
const string = intl2.string;
2026-07-29 08:29:29 +00:00
const t = pushScreen(1236).t;
2026-07-20 16:05:17 +00:00
if (hasItem) {
2026-07-29 08:29:29 +00:00
obj[0] = string(t.nRtNqn);
obj = { IconComponent: null };
2026-08-05 07:35:12 +00:00
obj[0] = tmp3(13739).TreehouseIcon;
obj[2] = tmp2(tmp3(5300).TableRow.Icon, obj);
2026-07-29 08:29:29 +00:00
obj[3] = function onPress() {
2026-07-23 10:11:24 +00:00
return pushScreen(outer1_12.COMMUNITY, {});
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
let tmp2Result = tmp2(TableRow, obj, "community-overview");
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
obj[0] = string(t.ElKTeb);
const obj1 = { IconComponent: null };
2026-08-05 07:35:12 +00:00
obj1[0] = tmp3(13739).TreehouseIcon;
obj[2] = tmp2(tmp3(5300).TableRow.Icon, obj1);
2026-07-29 08:29:29 +00:00
obj[3] = function onPress() {
2026-07-23 10:11:24 +00:00
return pushScreen(outer1_12.COMMUNITY_INTRO, {});
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
tmp2Result = tmp2(TableRow, obj, "community-intro");
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[2] = tmp2Result;
2026-08-05 07:35:12 +00:00
return closure_15(pushScreen(5634).TableRowGroup, obj);
2026-07-20 16:05:17 +00:00
}
function UserManagementSection(pushScreen) {
let canManageBans;
let canManageGuild;
let canManageRoles;
2026-07-23 10:11:24 +00:00
pushScreen = pushScreen.pushScreen;
2026-07-20 16:05:17 +00:00
({ canManageGuild, canManageRoles, canManageBans } = pushScreen);
2026-07-29 08:29:29 +00:00
let obj = { label: null, arrow: true, icon: null, onPress: null };
const intl = pushScreen(1236).intl;
obj[0] = intl.string(pushScreen(1236).t["9Oq93m"]);
obj = { IconComponent: null };
2026-08-05 07:35:12 +00:00
obj[0] = pushScreen(4768).GroupIcon;
obj[2] = callback(pushScreen(5300).TableRow.Icon, obj);
2026-07-29 08:29:29 +00:00
obj[3] = function onPress() {
2026-07-23 10:11:24 +00:00
return pushScreen(outer1_12.MEMBERS);
2026-07-20 16:05:17 +00:00
};
2026-08-05 07:35:12 +00:00
const items = [callback(pushScreen(5300).TableRow, obj, "members")];
2026-07-20 16:05:17 +00:00
if (canManageRoles) {
2026-07-29 08:29:29 +00:00
obj = { label: null, arrow: true, icon: null, onPress: null };
const intl2 = tmp2(1236).intl;
obj[0] = intl2.string(tmp2(1236).t["LPJmL/"]);
const obj1 = { IconComponent: null };
2026-08-05 07:35:12 +00:00
obj1[0] = tmp2(8900).ShieldUserIcon;
obj[2] = tmp(tmp2(5300).TableRow.Icon, obj1);
2026-07-29 08:29:29 +00:00
obj[3] = function onPress() {
2026-07-23 10:11:24 +00:00
return pushScreen(outer1_12.ROLES);
2026-07-20 16:05:17 +00:00
};
2026-08-05 07:35:12 +00:00
items.push(tmp(tmp2(5300).TableRow, obj, "roles"));
2026-07-20 16:05:17 +00:00
}
if (canManageGuild) {
2026-07-29 08:29:29 +00:00
const obj2 = { label: null, arrow: true, icon: null, onPress: null };
const intl3 = tmp2(1236).intl;
obj2[0] = intl3.string(tmp2(1236).t.ngRFjZ);
const obj3 = { IconComponent: null };
2026-08-05 07:35:12 +00:00
obj3[0] = tmp2(4199).LinkIcon;
obj2[2] = tmp(tmp2(5300).TableRow.Icon, obj3);
2026-07-29 08:29:29 +00:00
obj2[3] = function onPress() {
2026-07-23 10:11:24 +00:00
return pushScreen(outer1_12.INSTANT_INVITES);
2026-07-20 16:05:17 +00:00
};
2026-08-05 07:35:12 +00:00
items.push(tmp(tmp2(5300).TableRow, obj2, "invites"));
2026-07-20 16:05:17 +00:00
}
if (canManageBans) {
2026-07-29 08:29:29 +00:00
const obj4 = { label: null, arrow: true, icon: null, onPress: null };
const intl4 = tmp2(1236).intl;
obj4[0] = intl4.string(tmp2(1236).t.ZbeITS);
const obj5 = { IconComponent: null };
2026-08-05 07:35:12 +00:00
obj5[0] = tmp2(10426).HammerIcon;
obj4[2] = tmp(tmp2(5300).TableRow.Icon, obj5);
2026-07-29 08:29:29 +00:00
obj4[3] = function onPress() {
2026-07-23 10:11:24 +00:00
return pushScreen(outer1_12.BANS);
2026-07-20 16:05:17 +00:00
};
2026-08-05 07:35:12 +00:00
items.push(tmp(tmp2(5300).TableRow, obj4, "bans"));
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let tmpResult = null;
2026-07-20 16:05:17 +00:00
if (0 !== items.length) {
2026-07-29 08:29:29 +00:00
const obj6 = { title: null, hasIcons: true, children: null };
const intl5 = tmp2(1236).intl;
obj6[0] = intl5.string(tmp2(1236).t["+OecxG"]);
obj6[2] = items;
2026-08-05 07:35:12 +00:00
tmpResult = tmp(tmp2(5634).TableRowGroup, obj6);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmpResult;
2026-07-20 16:05:17 +00:00
}
function GuildSettingsModalLandingInner(guild) {
let canManageBans;
let canManageChannels;
2026-07-29 08:29:29 +00:00
let canManageGuild;
2026-07-20 16:05:17 +00:00
let canManageGuildExpressions;
let canManageRoles;
let canManageWebhooks;
let canViewAuditLog;
let isGuildAdmin;
guild = guild.guild;
const updateErrors = guild.updateErrors;
2026-07-29 08:29:29 +00:00
let navigation;
2026-08-05 07:35:12 +00:00
let obj = guild(3959);
2026-07-29 08:29:29 +00:00
const token = obj.useToken(updateErrors(712).modules.mobile.TABLE_ROW_PADDING);
const tmp5 = callback2();
let obj1 = guild(1480);
navigation = obj1.useNavigation();
let obj2 = guild(589);
let items = [comparator];
2026-07-20 16:05:17 +00:00
const stateFromStores = obj2.useStateFromStores(items, () => {
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-07-23 10:11:24 +00:00
const channels = outer1_5.getChannels(id);
2026-07-29 08:29:29 +00:00
let tmp4;
if (channels != null) {
tmp4 = channels[outer1_13.GUILD_CATEGORY];
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp4;
2026-07-20 16:05:17 +00:00
});
2026-07-29 08:29:29 +00:00
let obj3 = guild(589);
let items1 = [getUncachedChannelPermissions];
2026-07-23 10:11:24 +00:00
const stateFromStoresObject = obj3.useStateFromStoresObject(items1, () => outer1_7.getGuildPermissionProps(guild));
2026-07-29 08:29:29 +00:00
let obj4 = React;
2026-07-20 16:05:17 +00:00
const effect = React.useEffect(() => {
2026-07-29 08:29:29 +00:00
let obj = updateErrors(table[9]);
obj = { settings_type: "guild", origin_pane: "Array", destination_pane: "AFKTimeout" };
obj[2] = constants.LANDING;
obj.trackWithMetadata(constants2.SETTINGS_PANE_VIEWED, obj);
2026-07-20 16:05:17 +00:00
}, []);
const items2 = [navigation];
2026-07-29 08:29:29 +00:00
const callback = React.useCallback(() => {
2026-07-20 16:05:17 +00:00
const items = [...arguments];
const first = items[0];
2026-07-23 10:11:24 +00:00
updateErrors(outer1_3[35]).setSection(first);
2026-07-20 16:05:17 +00:00
const items1 = [...items];
navigation.push.apply(items1);
2026-07-29 08:29:29 +00:00
const obj = updateErrors(outer1_3[35]);
updateErrors(outer1_3[9]).trackWithMetadata(outer1_14.SETTINGS_PANE_VIEWED, { settings_type: "guild", origin_pane: outer1_12.LANDING, destination_pane: first });
2026-07-20 16:05:17 +00:00
}, items2);
2026-07-29 08:29:29 +00:00
({ canManageGuild, isGuildAdmin, canManageRoles, canManageBans, canManageGuildExpressions, canManageChannels, canViewAuditLog, canManageWebhooks } = stateFromStoresObject);
2026-08-05 07:35:12 +00:00
let obj5 = guild(16460);
2026-07-29 08:29:29 +00:00
const tmp11 = obj5.useChannelsAllowedToUnlink(guild.id).length > 0;
2026-08-05 07:35:12 +00:00
const canManageGuildRoleSubscriptions = guild(5774).useCanManageGuildRoleSubscriptions(guild);
2026-07-20 16:05:17 +00:00
let result = canManageGuild;
if (canManageGuild) {
2026-08-05 07:35:12 +00:00
result = tmp(5781).isGuildOfficialMessagesEnabled(guild, "GuildSettingsModalLanding");
const tmpResult = tmp(5781);
2026-07-20 16:05:17 +00:00
}
const items3 = [updateErrors.message];
2026-07-29 08:29:29 +00:00
const layoutEffect = obj4.useLayoutEffect(() => {
2026-07-20 16:05:17 +00:00
if (null != updateErrors.message) {
2026-07-29 08:29:29 +00:00
guild(outer1_3[39]).presentError(tmp.message);
2026-07-23 10:11:24 +00:00
const obj = guild(outer1_3[39]);
2026-07-20 16:05:17 +00:00
}
}, items3);
2026-07-29 08:29:29 +00:00
obj = { style: tmp5.container, contentContainerStyle: items4, children: null };
items4 = [tmp5.containerContent, guild.contentContainerStyle];
obj = { style: { paddingHorizontal: token }, spacing: null, children: null };
obj[1] = updateErrors(712).space.PX_24;
obj1 = { iconProps: obj2, text: guild.name, textAccessibilityRole: "header" };
obj2 = {
2026-07-20 16:05:17 +00:00
onUpload(base64) {
2026-07-23 10:11:24 +00:00
updateErrors(outer1_3[35]).updateIcon(guild.id, base64);
2026-07-20 16:05:17 +00:00
},
type: "guild",
icon: guild.icon,
name: guild.name,
2026-07-29 08:29:29 +00:00
makeURL(arg0) {
let guildIconURL = arg0;
if (arg0) {
2026-07-23 10:11:24 +00:00
let obj = updateErrors(outer1_3[43]);
2026-07-29 08:29:29 +00:00
obj = { id: null, icon: null, canAnimate: true, size: 64 };
obj[0] = guild.id;
obj[1] = arg0;
2026-07-20 16:05:17 +00:00
guildIconURL = obj.getGuildIconURL(obj);
}
return guildIconURL;
},
disabled: !stateFromStoresObject.canManageGuild
};
2026-08-05 07:35:12 +00:00
const items5 = [callback(updateErrors(15776), obj1), callback(SettingsSection, { guild, categories: stateFromStores, isGuildAdmin, canManageGuild, canManageGuildExpressions, canManageChannels, canUnlinkChannelLobbies: tmp11, canViewAuditLog, canManageWebhooks, canConfigureOfficialMessages: result, pushScreen: callback }), , , ];
2026-07-29 08:29:29 +00:00
let tmp17Result = canManageGuild;
2026-07-20 16:05:17 +00:00
if (canManageGuild) {
2026-07-29 08:29:29 +00:00
obj3 = { guild: null, pushScreen: null };
obj3[0] = guild;
obj3[1] = callback;
tmp17Result = tmp17(CommunitySection, obj3);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
items5[2] = tmp17Result;
tmp17Result = canManageGuildRoleSubscriptions;
2026-07-20 16:05:17 +00:00
if (canManageGuildRoleSubscriptions) {
2026-07-29 08:29:29 +00:00
obj4 = { guild: null, pushScreen: null };
obj4[0] = guild;
obj4[1] = callback;
2026-08-05 07:35:12 +00:00
tmp17Result = tmp17(tmp3(16461), obj4);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj5 = { children: null };
items5[3] = tmp17Result;
2026-07-20 16:05:17 +00:00
items5[4] = callback(UserManagementSection, { canManageGuild, canManageRoles, canManageBans, pushScreen: callback });
2026-07-29 08:29:29 +00:00
obj[2] = items5;
2026-08-05 07:35:12 +00:00
obj[2] = closure_16(guild(4663).Stack, obj);
const items6 = [callback(guild(7749).Form, obj), callback(guild(5581).NavScrim, {})];
2026-07-29 08:29:29 +00:00
obj5[0] = items6;
return closure_16(closure_17, obj5);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
({ GuildFeatures: unpackModuleId, GuildSettingsSections: closure_12, ChannelTypes: map1, AnalyticEvents: closure_14 } = ME);
2026-07-23 10:11:24 +00:00
({ jsx: closure_15, jsxs: closure_16, Fragment: closure_17 } = jsxProd);
2026-07-29 08:29:29 +00:00
let closure_18 = createCacheKey.createStyles({ container: { flex: 1 }, containerContent: { paddingTop: 16 } });
let result = require("createGuildRecordFromRust").fileFinishedImporting("modules/guild_settings/native/GuildSettingsModalLanding.tsx");
2026-07-20 16:05:17 +00:00
export default function GuildSettingsModalLanding(guildId) {
2026-07-23 10:11:24 +00:00
guildId = guildId.guildId;
2026-07-29 08:29:29 +00:00
let obj = guildId(589);
const items = [createGuildRecordFromRust];
2026-07-23 10:11:24 +00:00
const stateFromStores = obj.useStateFromStores(items, () => outer1_6.getGuild(guildId));
2026-07-29 08:29:29 +00:00
guildId(589);
[][0] = handleFormInit;
2026-07-20 16:05:17 +00:00
let tmp4 = null;
if (null != stateFromStores) {
2026-07-29 08:29:29 +00:00
obj = { guild: null, contentContainerStyle: null, updateErrors: null };
obj[0] = stateFromStores;
obj[1] = guildId.contentContainerStyle;
obj[2] = tmp3;
2026-07-20 16:05:17 +00:00
tmp4 = callback(GuildSettingsModalLandingInner, obj);
}
return tmp4;
};