1772 lines
64 KiB
TypeScript
1772 lines
64 KiB
TypeScript
// Module ID: 8579
|
|
// Function ID: 8580
|
|
// Name: CreateChannelModal
|
|
// Dependencies: [32, 19, 17, 2069, 2083, 2065, 2087, 4750, 4760, 1390, 1085, 7490, 21, 5092, 587, 8208, 8216, 8229, 8225, 8222, 8215, 8234, 8206, 8214, 8226, 8224, 8221, 8213, 8233, 1126, 5088, 2128, 558, 576, 4832, 6266, 8580, 1200, 6180, 6665, 504, 38, 5421, 5893, 8599, 8600, 1503, 8601, 8603, 5107, 6201, 8606, 7089, 12, 8607, 6286, 6265, 8608, 8616, 6896, 8223, 7568, 5377, 5414, 8620, 1273, 8634, 6170, 6688, 2]
|
|
|
|
// Module 8579 (CreateChannelModal)
|
|
import _modDef38 from "module_38" /* 38 */;
|
|
import react2 from "react" /* 576 */;
|
|
import nativeDefault from "native" /* 587 */;
|
|
import intl16 from "intl" /* 1126 */;
|
|
import discord_common_AnalyticsUtils from "discord_common/AnalyticsUtils" /* 1273 */;
|
|
import ChannelRecord from "ChannelRecord" /* 2069 */;
|
|
import GuildRecord from "GuildRecord" /* 2083 */;
|
|
import HelpdeskUtilsDefault from "HelpdeskUtils" /* 2128 */;
|
|
import Text_Text from "Text/Text" /* 5088 */;
|
|
import ChannelUtils from "ChannelUtils" /* 5414 */;
|
|
import useInitialValueDefault from "useInitialValue" /* 6170 */;
|
|
import NavigatorHeader from "NavigatorHeader" /* 6201 */;
|
|
import HeaderActionButton from "HeaderActionButton" /* 7089 */;
|
|
import ChannelPermissionsConstants from "ChannelPermissionsConstants" /* 7490 */;
|
|
import TextLockIcon from "TextLockIcon" /* 8206 */;
|
|
import TextIcon from "TextIcon" /* 8208 */;
|
|
import ImageLockIcon from "ImageLockIcon" /* 8213 */;
|
|
import ForumLockIcon from "ForumLockIcon" /* 8214 */;
|
|
import ImageIcon from "ImageIcon" /* 8215 */;
|
|
import ForumIcon from "ForumIcon" /* 8216 */;
|
|
import AnnouncementsLockIcon from "AnnouncementsLockIcon" /* 8221 */;
|
|
import AnnouncementsIcon from "AnnouncementsIcon" /* 8222 */;
|
|
import StageLockIcon from "StageLockIcon" /* 8224 */;
|
|
import StageIcon from "StageIcon" /* 8225 */;
|
|
import VoiceLockIcon from "VoiceLockIcon" /* 8226 */;
|
|
import VoiceNormalIcon from "VoiceNormalIcon" /* 8229 */;
|
|
import AppsLockIcon from "AppsLockIcon" /* 8233 */;
|
|
import AppsIcon from "AppsIcon" /* 8234 */;
|
|
import useCreateChannelSubmitDefault from "useCreateChannelSubmit" /* 8601 */;
|
|
import CreateChannelModalActionCreatorsDefault from "CreateChannelModalActionCreators" /* 8606 */;
|
|
import sanitizeChannelNameDefault from "sanitizeChannelName" /* 8607 */;
|
|
import AddModeratorsDefault from "AddModerators" /* 8634 */;
|
|
import _slicedToArray_mod from "_slicedToArray" /* 32 */;
|
|
import react_mod from "react" /* 19 */;
|
|
import react_native2 from "react-native" /* 17 */;
|
|
import ChannelStore_mod from "ChannelStore" /* 2065 */;
|
|
import GuildStore from "GuildStore" /* 2087 */;
|
|
import PermissionStore_mod from "PermissionStore" /* 4750 */;
|
|
import RelationshipStore from "RelationshipStore" /* 4760 */;
|
|
import UserStore from "UserStore" /* 1390 */;
|
|
import Constants from "Constants" /* 1085 */;
|
|
import Fragment from "Fragment" /* 21 */;
|
|
import createStyles from "createStyles" /* 5092 */;
|
|
import ReactCompilerGating_mod from "ReactCompilerGating" /* 558 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
const require = globalThis.__r;
|
|
let _require, arr1, constants, current, dependencyMap, importDefault, navigation, obj1, push2Result, row, setOptionsResult;
|
|
|
|
let closure_15;
|
|
let closure_16;
|
|
let closure_17;
|
|
let closure_18;
|
|
let closure_20;
|
|
let closure_21;
|
|
let closure_22;
|
|
let hasOwnProperty;
|
|
let metroRequire;
|
|
let obj2;
|
|
let tmp;
|
|
const native = tmp(1200);
|
|
const react_native = tmp(4832);
|
|
const TableRow2 = tmp(6180);
|
|
const FormRadio = tmp(6266);
|
|
const Form = tmp(8580);
|
|
function getChannelTypeLabel(channelType) {
|
|
let format;
|
|
let intl;
|
|
let intl10;
|
|
let intl11;
|
|
let intl12;
|
|
let intl13;
|
|
let intl14;
|
|
let intl15;
|
|
let intl2;
|
|
let intl4;
|
|
let intl5;
|
|
let intl6;
|
|
let intl7;
|
|
let intl8;
|
|
let intl9;
|
|
let items;
|
|
let obj12;
|
|
let obj6;
|
|
let obj9;
|
|
let v2Sapx1;
|
|
if (ChannelTypes.GUILD_TEXT === channelType) {
|
|
const obj2 = { label: intl14.string(intl16.t.pnuRXC), description: intl15.string(intl16.t.oG6WsM) };
|
|
intl14 = intl16.intl;
|
|
intl15 = intl16.intl;
|
|
return obj2;
|
|
} else if (ChannelTypes.GUILD_VOICE === channelType) {
|
|
obj3 = { label: intl12.string(intl16.t.Sx55Oh), description: intl13.string(intl16.t.pqfkoF) };
|
|
intl12 = intl16.intl;
|
|
intl13 = intl16.intl;
|
|
return obj3;
|
|
} else if (ChannelTypes.GUILD_FORUM === channelType) {
|
|
const obj4 = { label: intl10.string(intl16.t.eAVID5), description: intl11.string(intl16.t.iZ5pgg) };
|
|
intl10 = intl16.intl;
|
|
intl11 = intl16.intl;
|
|
return obj4;
|
|
} else if (ChannelTypes.GUILD_ANNOUNCEMENT === channelType) {
|
|
const obj5 = { label: intl8.string(intl16.t.qr9dEP), description: intl9.string(intl16.t.gBkfzu) };
|
|
intl8 = intl16.intl;
|
|
intl9 = intl16.intl;
|
|
return obj5;
|
|
} else if (ChannelTypes.GUILD_STAGE_VOICE === channelType) {
|
|
const obj7 = { label: intl6.string(intl16.t.pNWst0), description: intl7.string(intl16.t.VPAwgo) };
|
|
intl6 = intl16.intl;
|
|
intl7 = intl16.intl;
|
|
return obj7;
|
|
} else if (ChannelTypes.GUILD_APP === channelType) {
|
|
const obj8 = { label: intl4.string(intl16.t["A+8d6M"]), description: intl5.string(intl16.t.LVQQ3Z) };
|
|
intl4 = intl16.intl;
|
|
intl5 = intl16.intl;
|
|
return obj8;
|
|
} else if (ChannelTypes.GUILD_MEDIA === channelType) {
|
|
const obj = { label: intl.string(intl16.t["6x6fVg"]), description: authStore6(closure_21, obj9) };
|
|
intl = intl16.intl;
|
|
obj9 = { children: items };
|
|
const obj10 = { variant: "text-xs/normal", color: "text-muted", children: intl2.string(intl16.t.JyCrwS) };
|
|
const Text = Text_Text.Text;
|
|
intl2 = intl16.intl;
|
|
items = [closure_20(Text, obj10), ];
|
|
obj11 = { variant: "text-xs/normal", children: format(v2Sapx1, obj12) };
|
|
const Text2 = Text_Text.Text;
|
|
const intl3 = intl16.intl;
|
|
format = intl3.format;
|
|
obj12 = { hcArticleUrl: obj6.getCreatorSupportArticleURL(constants3.MEDIA_CHANNEL) };
|
|
v2Sapx1 = intl16.t["2Sapx1"];
|
|
obj6 = HelpdeskUtilsDefault;
|
|
items[1] = closure_20(Text2, obj11);
|
|
return obj;
|
|
}
|
|
}
|
|
function getSceneTitle(first1, stateFromStores1) {
|
|
if (null != stateFromStores1) {
|
|
const intl3 = intl16.intl;
|
|
return intl3.string(intl16.t.dEaPc4);
|
|
} else {
|
|
if (null !== first1) {
|
|
if (ChannelTypes.GUILD_TEXT !== first1) {
|
|
if (ChannelTypes.GUILD_VOICE !== first1) {
|
|
if (ChannelTypes.GUILD_STAGE_VOICE !== first1) {
|
|
if (ChannelTypes.GUILD_ANNOUNCEMENT !== first1) {
|
|
if (ChannelTypes.GUILD_FORUM !== first1) {
|
|
if (ChannelTypes.GUILD_MEDIA !== first1) {
|
|
if (ChannelTypes.GUILD_APP !== first1) {
|
|
if (ChannelTypes.GUILD_CATEGORY === first1) {
|
|
const intl = intl16.intl;
|
|
return intl.string(intl16.t["ISN+NM"]);
|
|
} else {
|
|
const _Error = Error;
|
|
const _HermesInternal = HermesInternal;
|
|
const self = this;
|
|
const self2 = this;
|
|
const error = new Error("Unsupported channelType: " + first1);
|
|
throw error;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const intl2 = intl16.intl;
|
|
return intl2.string(intl16.t["fUYU+j"]);
|
|
}
|
|
}
|
|
function getScreens() {
|
|
let intl;
|
|
let intl2;
|
|
function render(arg0) {
|
|
const obj = {};
|
|
const merged = Object.assign(arg0);
|
|
return closure_1_20(closure_1_28, obj);
|
|
}
|
|
let obj = {};
|
|
const CREATE_CHANNEL = constants4.CREATE_CHANNEL;
|
|
obj[CREATE_CHANNEL] = { impressionName: discord_common_AnalyticsUtils.ImpressionNames.CHANNEL_ADD_INFO, impressionProperties: { impression_group: discord_common_AnalyticsUtils.ImpressionGroups.CHANNEL_ADD_FLOW }, render };
|
|
const obj2 = { impressionName: discord_common_AnalyticsUtils.ImpressionNames.CHANNEL_ADD_INFO, impressionProperties: { impression_group: discord_common_AnalyticsUtils.ImpressionGroups.CHANNEL_ADD_FLOW }, render };
|
|
const ADD_MEMBERS = constants4.ADD_MEMBERS;
|
|
const obj4 = {
|
|
headerTitle: intl.string(intl16.t.dMJ3Y6),
|
|
impressionName: discord_common_AnalyticsUtils.ImpressionNames.CHANNEL_ADD_MEMBERS,
|
|
impressionProperties: { impression_group: discord_common_AnalyticsUtils.ImpressionGroups.CHANNEL_ADD_FLOW },
|
|
render(arg0) {
|
|
const obj = {};
|
|
const merged = Object.assign(arg0);
|
|
return closure_1_20(closure_1_29, obj);
|
|
}
|
|
};
|
|
({ impression_group: discord_common_AnalyticsUtils.ImpressionGroups.CHANNEL_ADD_FLOW });
|
|
intl = intl16.intl;
|
|
obj[ADD_MEMBERS] = obj4;
|
|
const ADD_MODERATORS = constants4.ADD_MODERATORS;
|
|
const obj6 = {
|
|
headerTitle: intl2.string(intl16.t.n3bcy8),
|
|
render(arg0) {
|
|
const obj = {};
|
|
const tmp = AddModeratorsDefault;
|
|
const merged = Object.assign(arg0);
|
|
return closure_1_20(tmp, obj);
|
|
}
|
|
};
|
|
({ impression_group: discord_common_AnalyticsUtils.ImpressionGroups.CHANNEL_ADD_FLOW });
|
|
intl2 = intl16.intl;
|
|
obj[ADD_MODERATORS] = obj6;
|
|
return obj;
|
|
}
|
|
let _slicedToArray = _slicedToArray_mod;
|
|
let react = react_mod;
|
|
({ ScrollView: hasOwnProperty, View: metroRequire } = react_native2);
|
|
const isGuildVocalChannelType = ChannelRecord.isGuildVocalChannelType;
|
|
let isGuildOwner = GuildRecord.isGuildOwner;
|
|
let ChannelStore = ChannelStore_mod;
|
|
let PermissionStore = PermissionStore_mod;
|
|
const ChannelTypes = Constants.ChannelTypes;
|
|
({ GuildFeatures: closure_15, Permissions: closure_16, AnalyticEvents: closure_17, HelpdeskArticles: closure_18 } = Constants);
|
|
const RowType = ChannelPermissionsConstants.RowType;
|
|
({ jsx: closure_20, Fragment: closure_21, jsxs: closure_22 } = Fragment);
|
|
let obj = { addMembersContainer: obj2, errorMessage: { marginBottom: 0 }, flexRow: { flexDirection: "row", alignItems: "center" }, horizontalContainer: { flex: 1, flexDirection: "row" } };
|
|
obj2 = { backgroundColor: nativeDefault.colors.BACKGROUND_BASE_LOW, flex: 1 };
|
|
let closure_23 = createStyles.createStyles(obj);
|
|
let obj3 = {};
|
|
let obj4 = { IconComponent: TextIcon.TextIcon };
|
|
obj3[ChannelTypes.GUILD_TEXT] = obj4;
|
|
let obj5 = { IconComponent: ForumIcon.ForumIcon };
|
|
obj3[ChannelTypes.GUILD_FORUM] = obj5;
|
|
let obj6 = { IconComponent: VoiceNormalIcon.VoiceNormalIcon };
|
|
obj3[ChannelTypes.GUILD_VOICE] = obj6;
|
|
let obj7 = { IconComponent: StageIcon.StageIcon };
|
|
obj3[ChannelTypes.GUILD_STAGE_VOICE] = obj7;
|
|
let obj8 = { IconComponent: AnnouncementsIcon.AnnouncementsIcon };
|
|
obj3[ChannelTypes.GUILD_ANNOUNCEMENT] = obj8;
|
|
let obj9 = { IconComponent: ImageIcon.ImageIcon };
|
|
obj3[ChannelTypes.GUILD_MEDIA] = obj9;
|
|
let obj10 = { IconComponent: AppsIcon.AppsIcon };
|
|
obj3[ChannelTypes.GUILD_APP] = obj10;
|
|
let obj11 = {};
|
|
let obj12 = { IconComponent: TextLockIcon.TextLockIcon };
|
|
obj11[ChannelTypes.GUILD_TEXT] = obj12;
|
|
let obj13 = { IconComponent: ForumLockIcon.ForumLockIcon };
|
|
obj11[ChannelTypes.GUILD_FORUM] = obj13;
|
|
let obj14 = { IconComponent: VoiceLockIcon.VoiceLockIcon };
|
|
obj11[ChannelTypes.GUILD_VOICE] = obj14;
|
|
let obj15 = { IconComponent: StageLockIcon.StageLockIcon };
|
|
obj11[ChannelTypes.GUILD_STAGE_VOICE] = obj15;
|
|
let obj16 = { IconComponent: AnnouncementsLockIcon.AnnouncementsLockIcon };
|
|
obj11[ChannelTypes.GUILD_ANNOUNCEMENT] = obj16;
|
|
let obj17 = { IconComponent: ImageLockIcon.ImageLockIcon };
|
|
obj11[ChannelTypes.GUILD_MEDIA] = obj17;
|
|
let obj18 = { IconComponent: AppsLockIcon.AppsLockIcon };
|
|
obj11[ChannelTypes.GUILD_APP] = obj18;
|
|
let ReactCompilerGating = ReactCompilerGating_mod;
|
|
let closure_27 = ReactCompilerGating.isReactCompilerEnabled() ? (function ChannelTypeRow(selected) {
|
|
let accessibilityRole;
|
|
let accessibilityState;
|
|
let description;
|
|
let isBeta;
|
|
let items;
|
|
let label;
|
|
let onPress;
|
|
let tmp5;
|
|
let tmp7;
|
|
let tmp = require;
|
|
const obj = react2;
|
|
const cResult = obj.c(27);
|
|
selected = selected.selected;
|
|
const channelType = selected.channelType;
|
|
({ isBeta, onPress } = selected);
|
|
const isPrivate = selected.isPrivate;
|
|
const tmp4 = closure_23();
|
|
if (cResult[0] !== selected) {
|
|
const obj2 = { selected };
|
|
cResult[0] = selected;
|
|
cResult[1] = obj2;
|
|
tmp5 = obj2;
|
|
} else {
|
|
tmp5 = cResult[1];
|
|
}
|
|
const tmpResult = react_native;
|
|
const radioA11yNative = tmpResult.useRadioA11yNative(tmp5);
|
|
({ accessibilityRole, accessibilityState } = radioA11yNative);
|
|
const IconComponent = (isPrivate ? obj11 : obj3)[channelType].IconComponent;
|
|
if (cResult[2] !== channelType) {
|
|
const tmp9 = getChannelTypeLabel(channelType);
|
|
cResult[2] = channelType;
|
|
cResult[3] = tmp9;
|
|
tmp7 = tmp9;
|
|
} else {
|
|
tmp7 = cResult[3];
|
|
}
|
|
({ label, description } = tmp7);
|
|
if (cResult[4] === channelType) {
|
|
if (cResult[5] === onPress) {
|
|
let tmp10;
|
|
let tmp11;
|
|
if (cResult[6] === selected) {
|
|
tmp10 = cResult[7];
|
|
}
|
|
if (cResult[8] !== IconComponent) {
|
|
const tmp13 = closure_20(IconComponent, {});
|
|
cResult[8] = IconComponent;
|
|
cResult[9] = tmp13;
|
|
tmp11 = tmp13;
|
|
} else {
|
|
tmp11 = cResult[9];
|
|
}
|
|
if (cResult[10] === tmp4.flexRow) {
|
|
let tmp14;
|
|
let tmp18;
|
|
if (cResult[11] === tmp11) {
|
|
tmp14 = cResult[12];
|
|
}
|
|
if (cResult[13] !== selected) {
|
|
obj3 = { selected };
|
|
const tmp20 = closure_20(FormRadio.FormRadio, obj3);
|
|
cResult[13] = selected;
|
|
cResult[14] = tmp20;
|
|
tmp18 = tmp20;
|
|
} else {
|
|
tmp18 = cResult[14];
|
|
}
|
|
if (cResult[15] === isBeta) {
|
|
if (cResult[16] === label) {
|
|
let tmp21;
|
|
if (cResult[17] === tmp4.horizontalContainer) {
|
|
tmp21 = cResult[18];
|
|
}
|
|
if (cResult[19] === accessibilityRole) {
|
|
if (cResult[20] === accessibilityState) {
|
|
if (cResult[21] === description) {
|
|
if (cResult[22] === tmp10) {
|
|
if (cResult[23] === tmp14) {
|
|
if (cResult[24] === tmp18) {
|
|
let tmp23;
|
|
if (cResult[25] === tmp21) {
|
|
tmp23 = cResult[26];
|
|
}
|
|
return tmp23;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const obj4 = { onPress: tmp10, accessibilityRole, accessibilityState, icon: tmp14, trailing: tmp18, label: tmp21, subLabel: description };
|
|
cResult[19] = accessibilityRole;
|
|
cResult[20] = accessibilityState;
|
|
cResult[21] = description;
|
|
cResult[22] = tmp10;
|
|
cResult[23] = tmp14;
|
|
cResult[24] = tmp18;
|
|
cResult[25] = tmp21;
|
|
const tmp25 = closure_20(TableRow2.TableRow, obj4);
|
|
class L {
|
|
constructor() {
|
|
tmp = !selected;
|
|
if (tmp) {
|
|
tmp2 = onPress;
|
|
tmp3 = channelType;
|
|
tmp4 = onPress(channelType);
|
|
}
|
|
return;
|
|
}
|
|
}
|
|
tmp23 = tmp25;
|
|
}
|
|
}
|
|
let tmp22 = label;
|
|
if (true === isBeta) {
|
|
const obj5 = { style: tmp4.horizontalContainer, children: items };
|
|
const obj6 = { text: label };
|
|
items = [closure_20(Form.FormLabel, obj6), ];
|
|
const obj7 = { size: native.BetaSizes.SMALL };
|
|
const BetaTag = native.BetaTag;
|
|
items[1] = closure_20(BetaTag, obj7);
|
|
tmp22 = authStore6(metroRequire, obj5);
|
|
}
|
|
cResult[15] = isBeta;
|
|
cResult[16] = label;
|
|
cResult[17] = tmp4.horizontalContainer;
|
|
cResult[18] = tmp22;
|
|
tmp21 = tmp22;
|
|
}
|
|
const obj8 = { style: tmp4.flexRow, children: tmp11 };
|
|
const tmp17 = closure_20(metroRequire, obj8);
|
|
cResult[10] = tmp4.flexRow;
|
|
cResult[11] = tmp11;
|
|
cResult[12] = tmp17;
|
|
tmp14 = tmp17;
|
|
}
|
|
}
|
|
class L {
|
|
constructor() {
|
|
tmp = !selected;
|
|
if (tmp) {
|
|
tmp2 = onPress;
|
|
tmp3 = channelType;
|
|
tmp4 = onPress(channelType);
|
|
}
|
|
return;
|
|
}
|
|
}
|
|
cResult[4] = channelType;
|
|
cResult[5] = onPress;
|
|
cResult[6] = selected;
|
|
cResult[7] = L;
|
|
tmp10 = L;
|
|
}) : (function ChannelTypeRow(selected) {
|
|
let accessibilityRole;
|
|
let accessibilityState;
|
|
let isBeta;
|
|
let isPrivate;
|
|
let items;
|
|
let tmp8;
|
|
selected = selected.selected;
|
|
const channelType = selected.channelType;
|
|
const onPress = selected.onPress;
|
|
({ isPrivate, isBeta } = selected);
|
|
let tmp = closure_23();
|
|
const obj = react_native;
|
|
const radioA11yNative = obj.useRadioA11yNative({ selected });
|
|
({ accessibilityRole, accessibilityState } = radioA11yNative);
|
|
const IconComponent = (isPrivate ? obj11 : obj3)[channelType].IconComponent;
|
|
const tmp5 = getChannelTypeLabel(channelType);
|
|
const label = tmp5.label;
|
|
const description = tmp5.description;
|
|
const obj2 = {
|
|
onPress() {
|
|
const tmp = !selected;
|
|
if (tmp) {
|
|
onPress(channelType);
|
|
}
|
|
},
|
|
accessibilityRole,
|
|
accessibilityState,
|
|
icon: closure_20(metroRequire, obj3),
|
|
trailing: closure_20(FormRadio.FormRadio, { selected }),
|
|
label: tmp8,
|
|
subLabel: description
|
|
};
|
|
obj3 = { style: tmp.flexRow, children: closure_20(IconComponent, {}) };
|
|
const TableRow = tmp2(6180).TableRow;
|
|
tmp8 = label;
|
|
const tmp7 = metroRequire;
|
|
if (true === isBeta) {
|
|
const obj4 = { style: tmp.horizontalContainer, children: items };
|
|
const obj5 = { text: label };
|
|
items = [closure_20(tmp2(8580).FormLabel, obj5), ];
|
|
const obj6 = { size: native.BetaSizes.SMALL };
|
|
const BetaTag = tmp2(1200).BetaTag;
|
|
items[1] = closure_20(BetaTag, obj6);
|
|
tmp8 = authStore6(tmp7, obj4);
|
|
}
|
|
return closure_20(TableRow, obj2);
|
|
});
|
|
ReactCompilerGating = ReactCompilerGating_mod;
|
|
let tmp5 = ReactCompilerGating.isReactCompilerEnabled() ? (function CreateChannel(categoryId) {
|
|
let channelType;
|
|
let cloneChannelId;
|
|
let closure_11;
|
|
let closure_15;
|
|
let closure_9;
|
|
let createMode;
|
|
let first;
|
|
let first2;
|
|
let first4;
|
|
let first5;
|
|
let tmp10;
|
|
let tmp12;
|
|
let tmp29;
|
|
let tmp41;
|
|
let tmp42;
|
|
let tmp8;
|
|
let tmp = categoryId;
|
|
let tmp2 = createMode;
|
|
let obj = categoryId(createMode[33]);
|
|
const cResult = obj.c(83);
|
|
categoryId = categoryId.categoryId;
|
|
({ channelType, cloneChannelId } = categoryId);
|
|
createMode = categoryId.createMode;
|
|
const guildId = categoryId.guildId;
|
|
const onChannelCreated = categoryId.onChannelCreated;
|
|
const tmp4 = closure_23();
|
|
let tmp5 = cloneChannelId;
|
|
const insets = cloneChannelId(createMode[39])().insets;
|
|
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
let tmp7 = first2;
|
|
let items = [first2];
|
|
cResult[0] = items;
|
|
first = items;
|
|
} else {
|
|
first = cResult[0];
|
|
}
|
|
if (cResult[1] !== guildId) {
|
|
const fn = function _() {
|
|
return GuildStore.getGuild(guildId);
|
|
};
|
|
cResult[1] = guildId;
|
|
cResult[2] = fn;
|
|
tmp8 = fn;
|
|
} else {
|
|
tmp8 = cResult[2];
|
|
}
|
|
let tmpResult = tmp(tmp2[40]);
|
|
const stateFromStores = tmpResult.useStateFromStores(first, tmp8);
|
|
if (cResult[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
let tmp11 = ChannelStore;
|
|
const items1 = [ChannelStore];
|
|
cResult[3] = items1;
|
|
tmp10 = items1;
|
|
} else {
|
|
tmp10 = cResult[3];
|
|
}
|
|
if (cResult[4] !== cloneChannelId) {
|
|
class H {
|
|
constructor() {
|
|
let channel = null;
|
|
if (null != cloneChannelId) {
|
|
channel = ChannelStore.getChannel(tmp);
|
|
}
|
|
return channel;
|
|
}
|
|
}
|
|
cResult[4] = cloneChannelId;
|
|
cResult[5] = H;
|
|
tmp12 = H;
|
|
} else {
|
|
class H {
|
|
constructor() {
|
|
let channel = null;
|
|
if (null != cloneChannelId) {
|
|
channel = ChannelStore.getChannel(tmp);
|
|
}
|
|
return channel;
|
|
}
|
|
}
|
|
}
|
|
const tmpResult5 = tmp(tmp2[40]);
|
|
const stateFromStores1 = tmpResult5.useStateFromStores(tmp10, tmp12);
|
|
if (cResult[6] !== stateFromStores) {
|
|
class H {
|
|
constructor() {
|
|
let channel = null;
|
|
if (null != cloneChannelId) {
|
|
channel = ChannelStore.getChannel(tmp);
|
|
}
|
|
return channel;
|
|
}
|
|
}
|
|
let hasItem = null != stateFromStores;
|
|
if (hasItem) {
|
|
class H {
|
|
constructor() {
|
|
let channel = null;
|
|
if (null != cloneChannelId) {
|
|
channel = ChannelStore.getChannel(tmp);
|
|
}
|
|
return channel;
|
|
}
|
|
}
|
|
hasItem = obj4.has(constants.COMMUNITY);
|
|
}
|
|
cResult[6] = stateFromStores;
|
|
cResult[7] = hasItem;
|
|
} else {
|
|
class H {
|
|
constructor() {
|
|
let channel = null;
|
|
if (null != cloneChannelId) {
|
|
channel = ChannelStore.getChannel(tmp);
|
|
}
|
|
return channel;
|
|
}
|
|
}
|
|
}
|
|
const canResult = PermissionStore.can(first5.VIEW_CHANNEL, stateFromStores);
|
|
let closure_6 = canResult;
|
|
const canResult1 = PermissionStore.can(first5.CONNECT, stateFromStores);
|
|
const currentUser = navigation.getCurrentUser();
|
|
const tmp20 = tmp5(tmp2[41])(null != currentUser, "CreateChannel: user cannot be undefined");
|
|
const tmp21 = tmp5(tmp2[42])(stateFromStores1);
|
|
const useState = onChannelCreated.useState;
|
|
if (tmp21 == null) {
|
|
class H {
|
|
constructor() {
|
|
let channel = null;
|
|
if (null != cloneChannelId) {
|
|
channel = ChannelStore.getChannel(tmp);
|
|
}
|
|
return channel;
|
|
}
|
|
}
|
|
}
|
|
const tmp23 = guildId(useState(tmp21), 2);
|
|
const first1 = tmp23[0];
|
|
ChannelStore = tmp23[1];
|
|
const useState2 = obj5.useState;
|
|
if (null == channelType) {
|
|
class H {
|
|
constructor() {
|
|
let channel = null;
|
|
if (null != cloneChannelId) {
|
|
channel = ChannelStore.getChannel(tmp);
|
|
}
|
|
return channel;
|
|
}
|
|
}
|
|
channelType = first4.GUILD_TEXT;
|
|
}
|
|
const tmp22Result = guildId(useState2(channelType), 2);
|
|
first2 = tmp22Result[0];
|
|
PermissionStore = tmp22Result[1];
|
|
const tmpResult6 = tmp(tmp2[43]);
|
|
const canCreateStageChannelByGuild = tmpResult6.useCanCreateStageChannelByGuild(guildId);
|
|
const tmpResult7 = tmp(tmp2[44]);
|
|
const guildEligibleForMediaChannels = tmpResult7.useGuildEligibleForMediaChannels(stateFromStores);
|
|
if (cResult[8] !== guildId) {
|
|
class H {
|
|
constructor() {
|
|
let channel = null;
|
|
if (null != cloneChannelId) {
|
|
channel = ChannelStore.getChannel(tmp);
|
|
}
|
|
return channel;
|
|
}
|
|
}
|
|
tmp30[0] = guildId;
|
|
cResult[8] = guildId;
|
|
cResult[9] = tmp30;
|
|
tmp29 = tmp30;
|
|
} else {
|
|
class H {
|
|
constructor() {
|
|
let channel = null;
|
|
if (null != cloneChannelId) {
|
|
channel = ChannelStore.getChannel(tmp);
|
|
}
|
|
return channel;
|
|
}
|
|
}
|
|
}
|
|
const tmp5Result = tmp5(tmp2[45]);
|
|
const enabled = tmp5Result.useConfig(tmp29).enabled;
|
|
const useState3 = obj5.useState;
|
|
if (stateFromStores1 != null) {
|
|
class H {
|
|
constructor() {
|
|
let channel = null;
|
|
if (null != cloneChannelId) {
|
|
channel = ChannelStore.getChannel(tmp);
|
|
}
|
|
return channel;
|
|
}
|
|
}
|
|
}
|
|
if (undefined == null) {
|
|
class H {
|
|
constructor() {
|
|
let channel = null;
|
|
if (null != cloneChannelId) {
|
|
channel = ChannelStore.getChannel(tmp);
|
|
}
|
|
return channel;
|
|
}
|
|
}
|
|
}
|
|
const first3 = tmp22(useState3(undefined), 2)[0];
|
|
guildId(useState3(undefined), 2);
|
|
const tmpResult8 = tmp(tmp2[46]);
|
|
navigation = tmpResult8.useNavigation();
|
|
const tmp22Result5 = guildId(tmp5(tmp2[47])(onChannelCreated), 3);
|
|
first4 = tmp22Result5[0];
|
|
constants = tmp37;
|
|
const tmp22Result6 = guildId(onChannelCreated.useState(false), 2);
|
|
first5 = tmp22Result6[0];
|
|
let closure_17 = tmp22Result6[1];
|
|
if (first5) {
|
|
class H {
|
|
constructor() {
|
|
let channel = null;
|
|
if (null != cloneChannelId) {
|
|
channel = ChannelStore.getChannel(tmp);
|
|
}
|
|
return channel;
|
|
}
|
|
}
|
|
let privateChannelHintText = null;
|
|
if (!obj10.canCreatePrivateChannel(first2, canResult, canResult1)) {
|
|
class H {
|
|
constructor() {
|
|
let channel = null;
|
|
if (null != cloneChannelId) {
|
|
channel = ChannelStore.getChannel(tmp);
|
|
}
|
|
return channel;
|
|
}
|
|
}
|
|
privateChannelHintText = obj11.getPrivateChannelHintText(first2);
|
|
}
|
|
}
|
|
if (cResult[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
class H {
|
|
constructor() {
|
|
let channel = null;
|
|
if (null != cloneChannelId) {
|
|
channel = ChannelStore.getChannel(tmp);
|
|
}
|
|
return channel;
|
|
}
|
|
}
|
|
const items2 = [];
|
|
cResult[10] = tmp43;
|
|
cResult[11] = items2;
|
|
tmp42 = items2;
|
|
tmp41 = tmp43;
|
|
} else {
|
|
class H {
|
|
constructor() {
|
|
let channel = null;
|
|
if (null != cloneChannelId) {
|
|
channel = ChannelStore.getChannel(tmp);
|
|
}
|
|
return channel;
|
|
}
|
|
}
|
|
tmp42 = cResult[11];
|
|
}
|
|
const effect = obj5.useEffect(tmp41, tmp42);
|
|
if (cResult[12] === first3) {
|
|
class H {
|
|
constructor() {
|
|
let channel = null;
|
|
if (null != cloneChannelId) {
|
|
channel = ChannelStore.getChannel(tmp);
|
|
}
|
|
return channel;
|
|
}
|
|
}
|
|
}
|
|
function ce() {
|
|
let obj2;
|
|
let obj = {
|
|
headerLeft: obj2.getHeaderCloseButton(CreateChannelModalActionCreatorsDefault.close),
|
|
headerRight() {
|
|
let applicationId;
|
|
let channelType;
|
|
let name;
|
|
let tmp18;
|
|
let tmpResult;
|
|
const tmp = closure_2_20;
|
|
const tmp2 = categoryId;
|
|
const tmp3 = createMode;
|
|
if (constants) {
|
|
tmpResult = tmp(tmp2(tmp3[50]).HeaderSubmittingIndicator, {});
|
|
} else {
|
|
let tmp5 = first5;
|
|
if (!tmp5) {
|
|
let stringResult;
|
|
const tmp6 = first2;
|
|
const tmp7 = first4;
|
|
if (first2 !== first4.GUILD_STAGE_VOICE) {
|
|
const tmp9 = createMode;
|
|
const intl = categoryId(createMode[29]).intl;
|
|
const tmp10 = categoryId;
|
|
const tmp11 = createMode;
|
|
stringResult = intl.string(categoryId(createMode[29]).t.CumH4u);
|
|
}
|
|
let obj = {
|
|
text: stringResult,
|
|
disabled: tmp18,
|
|
onPress() {
|
|
let bitrate;
|
|
let items;
|
|
let userLimit;
|
|
if (null != closure_1_5) {
|
|
const obj = cloneChannelId(closure_2_2[53]);
|
|
items = obj.values(tmp.permissionOverwrites);
|
|
} else {
|
|
items = [];
|
|
}
|
|
const obj2 = { overwrites: items, bitrate, userLimit, createMode, guildId, name, channelType, categoryId, applicationId, onChannelCreated };
|
|
bitrate = undefined;
|
|
if (closure_1_5 != null) {
|
|
bitrate = tmp.bitrate;
|
|
}
|
|
userLimit = undefined;
|
|
if (closure_1_5 != null) {
|
|
userLimit = tmp.userLimit;
|
|
}
|
|
const tmp12 = closure_1_16;
|
|
if (tmp12) {
|
|
obj3 = { guildId: tmp6, channelType, name: tmp7, categoryId: tmp9, applicationId: tmp10, onChannelCreated: tmp11 };
|
|
closure_1_13.push(constants2.ADD_MEMBERS, obj3);
|
|
} else if (channelType === constants.GUILD_STAGE_VOICE) {
|
|
closure_1_13.push(constants2.ADD_MODERATORS, obj2);
|
|
} else {
|
|
closure_1_15(obj2);
|
|
}
|
|
}
|
|
};
|
|
tmp18 = "" === first1;
|
|
if (!tmp18) {
|
|
if (tmp5) {
|
|
let obj2 = categoryId(createMode[48]);
|
|
tmp5 = !obj2.canCreatePrivateChannel(first2, closure_1_6, canResult1);
|
|
}
|
|
tmp18 = tmp5;
|
|
}
|
|
if (!tmp18) {
|
|
tmp18 = first2 === first4.GUILD_APP && null == first3;
|
|
const tmp26 = first2 === first4.GUILD_APP && null == first3;
|
|
}
|
|
tmpResult = tmp(tmp4, obj);
|
|
}
|
|
const intl2 = categoryId(createMode[29]).intl;
|
|
stringResult = intl2.string(categoryId(createMode[29]).t.PDTjLN);
|
|
}
|
|
return tmpResult;
|
|
},
|
|
headerTitle: getSceneTitle(first2, stateFromStores1)
|
|
};
|
|
const setOptions = navigation.setOptions;
|
|
obj2 = NavigatorHeader;
|
|
setOptions(obj);
|
|
}
|
|
const items3 = [navigation, first2, stateFromStores1, canResult, canResult1, first5, first1, first4, guildId, tmp22Result5[2], categoryId, createMode, onChannelCreated, first3];
|
|
cResult[12] = first3;
|
|
cResult[13] = canResult1;
|
|
cResult[14] = canResult;
|
|
cResult[15] = categoryId;
|
|
cResult[16] = first2;
|
|
cResult[17] = stateFromStores1;
|
|
cResult[18] = tmp22Result5[2];
|
|
cResult[19] = createMode;
|
|
cResult[20] = guildId;
|
|
cResult[21] = first5;
|
|
cResult[22] = first1;
|
|
cResult[23] = navigation;
|
|
cResult[24] = onChannelCreated;
|
|
cResult[25] = first4;
|
|
cResult[26] = items3;
|
|
cResult[27] = ce;
|
|
}) : (function CreateChannel(categoryId) {
|
|
let Stack;
|
|
let TableSwitchRow;
|
|
let channelType;
|
|
let closure_11;
|
|
let closure_15;
|
|
let createMode;
|
|
let first5;
|
|
let intl12;
|
|
let items3;
|
|
let items4;
|
|
let obj20;
|
|
let obj22;
|
|
let obj26;
|
|
let obj6;
|
|
let stringResult;
|
|
let stringResult1;
|
|
let stringResult2;
|
|
let tmp4Result10;
|
|
categoryId = categoryId.categoryId;
|
|
({ channelType, cloneChannelId: importDefault, createMode } = categoryId);
|
|
const guildId = categoryId.guildId;
|
|
const onChannelCreated = categoryId.onChannelCreated;
|
|
let c6;
|
|
let canResult1;
|
|
let value;
|
|
let closure_9;
|
|
let first1;
|
|
PermissionStore = undefined;
|
|
let first2;
|
|
navigation = undefined;
|
|
let first3;
|
|
constants = undefined;
|
|
let first4;
|
|
let closure_17;
|
|
let tmp = closure_23();
|
|
let tmp2 = importDefault;
|
|
let tmp3 = createMode;
|
|
const tmp4 = categoryId;
|
|
const insets = require("useSafeAreaInsetsKeyboardAware")().insets;
|
|
let obj = categoryId(createMode[40]);
|
|
let items = [first1];
|
|
const stateFromStores = obj.useStateFromStores(items, () => GuildStore.getGuild(guildId));
|
|
let obj2 = categoryId(createMode[40]);
|
|
const items1 = [closure_9];
|
|
const stateFromStores1 = obj2.useStateFromStores(items1, () => {
|
|
let channel = null;
|
|
if (null != importDefault) {
|
|
channel = ChannelStore.getChannel(tmp);
|
|
}
|
|
return channel;
|
|
});
|
|
let hasItem = null != stateFromStores;
|
|
if (hasItem) {
|
|
const features = stateFromStores.features;
|
|
hasItem = features.has(constants.COMMUNITY);
|
|
}
|
|
const canResult = PermissionStore.can(first4.VIEW_CHANNEL, stateFromStores);
|
|
c6 = canResult;
|
|
canResult1 = PermissionStore.can(first4.CONNECT, stateFromStores);
|
|
let tmp11 = navigation;
|
|
const currentUser = navigation.getCurrentUser();
|
|
const tmp13 = tmp2(tmp3[41])(null != currentUser, "CreateChannel: user cannot be undefined");
|
|
let str = tmp2(tmp3[42])(stateFromStores1);
|
|
obj3 = onChannelCreated;
|
|
const useState = onChannelCreated.useState;
|
|
if (str == null) {
|
|
str = "";
|
|
}
|
|
const tmp14 = guildId;
|
|
const tmp15 = guildId(useState(str), 2);
|
|
value = tmp15[0];
|
|
closure_9 = tmp15[1];
|
|
const useState2 = obj3.useState;
|
|
if (null == channelType) {
|
|
channelType = first3.GUILD_TEXT;
|
|
}
|
|
const tmp14Result = tmp14(useState2(channelType), 2);
|
|
first1 = tmp14Result[0];
|
|
PermissionStore = tmp14Result[1];
|
|
const tmp4Result = tmp4(tmp3[43]);
|
|
const canCreateStageChannelByGuild = tmp4Result.useCanCreateStageChannelByGuild(guildId);
|
|
const tmp4Result6 = tmp4(tmp3[44]);
|
|
const guildEligibleForMediaChannels = tmp4Result6.useGuildEligibleForMediaChannels(stateFromStores);
|
|
let application_id;
|
|
const tmp2Result = tmp2(tmp3[45]);
|
|
const enabled = tmp2Result.useConfig({ guildId, location: "CreateChannel mobile" }).enabled;
|
|
const useState3 = obj3.useState;
|
|
if (stateFromStores1 != null) {
|
|
application_id = stateFromStores1.application_id;
|
|
}
|
|
if (application_id == null) {
|
|
application_id = null;
|
|
}
|
|
const tmp14Result4 = tmp14(useState3(application_id), 2);
|
|
first2 = tmp14Result4[0];
|
|
const tmp25 = tmp14Result4[1];
|
|
const tmp4Result7 = tmp4(tmp3[46]);
|
|
navigation = tmp4Result7.useNavigation();
|
|
const tmp14Result5 = tmp14(tmp2(tmp3[47])(onChannelCreated), 3);
|
|
first3 = tmp14Result5[0];
|
|
constants = tmp30;
|
|
const tmp14Result6 = tmp14(obj3.useState(false), 2);
|
|
first4 = tmp14Result6[0];
|
|
closure_17 = tmp14Result6[1];
|
|
let privateChannelHintText = null;
|
|
if (first4) {
|
|
privateChannelHintText = null;
|
|
const tmp4Result8 = tmp4(tmp3[48]);
|
|
if (!tmp4Result8.canCreatePrivateChannel(first1, canResult, canResult1)) {
|
|
const tmp4Result9 = tmp4(tmp3[48]);
|
|
privateChannelHintText = tmp4Result9.getPrivateChannelHintText(first1);
|
|
}
|
|
}
|
|
const effect = obj3.useEffect(() => {
|
|
const obj = require("AppAnalyticsUtils");
|
|
obj.trackWithMetadata(closure_17.OPEN_MODAL, { type: "Create Channel" });
|
|
}, []);
|
|
const items2 = [navigation, first1, stateFromStores1, canResult, canResult1, first4, value, first3, guildId, tmp14Result5[2], categoryId, createMode, onChannelCreated, first2];
|
|
const effect1 = obj3.useEffect(() => {
|
|
let obj2;
|
|
let obj = {
|
|
headerLeft: obj2.getHeaderCloseButton(CreateChannelModalActionCreatorsDefault.close),
|
|
headerRight() {
|
|
let applicationId;
|
|
let channelType;
|
|
let name;
|
|
let tmp18;
|
|
let tmpResult;
|
|
const tmp = closure_2_20;
|
|
const tmp2 = categoryId;
|
|
const tmp3 = createMode;
|
|
if (constants) {
|
|
tmpResult = tmp(tmp2(tmp3[50]).HeaderSubmittingIndicator, {});
|
|
} else {
|
|
let tmp5 = first4;
|
|
if (!tmp5) {
|
|
let stringResult;
|
|
const tmp6 = first1;
|
|
const tmp7 = first3;
|
|
if (first1 !== first3.GUILD_STAGE_VOICE) {
|
|
const tmp9 = createMode;
|
|
const intl = categoryId(createMode[29]).intl;
|
|
const tmp10 = categoryId;
|
|
const tmp11 = createMode;
|
|
stringResult = intl.string(categoryId(createMode[29]).t.CumH4u);
|
|
}
|
|
let obj = {
|
|
text: stringResult,
|
|
disabled: tmp18,
|
|
onPress() {
|
|
let bitrate;
|
|
let items;
|
|
let userLimit;
|
|
if (null != closure_1_5) {
|
|
const obj = closure_2_1(closure_2_2[53]);
|
|
items = obj.values(tmp.permissionOverwrites);
|
|
} else {
|
|
items = [];
|
|
}
|
|
const obj2 = { overwrites: items, bitrate, userLimit, createMode, guildId, name, channelType, categoryId, applicationId, onChannelCreated };
|
|
bitrate = undefined;
|
|
if (closure_1_5 != null) {
|
|
bitrate = tmp.bitrate;
|
|
}
|
|
userLimit = undefined;
|
|
if (closure_1_5 != null) {
|
|
userLimit = tmp.userLimit;
|
|
}
|
|
const tmp12 = closure_1_16;
|
|
if (tmp12) {
|
|
obj3 = { guildId: tmp6, channelType, name: tmp7, categoryId: tmp9, applicationId: tmp10, onChannelCreated: tmp11 };
|
|
closure_1_13.push(constants2.ADD_MEMBERS, obj3);
|
|
} else if (channelType === constants.GUILD_STAGE_VOICE) {
|
|
closure_1_13.push(constants2.ADD_MODERATORS, obj2);
|
|
} else {
|
|
closure_1_15(obj2);
|
|
}
|
|
}
|
|
};
|
|
tmp18 = "" === closure_1_8;
|
|
if (!tmp18) {
|
|
if (tmp5) {
|
|
let obj2 = categoryId(createMode[48]);
|
|
tmp5 = !obj2.canCreatePrivateChannel(first1, closure_1_6, canResult1);
|
|
}
|
|
tmp18 = tmp5;
|
|
}
|
|
if (!tmp18) {
|
|
tmp18 = first1 === first3.GUILD_APP && null == first2;
|
|
const tmp26 = first1 === first3.GUILD_APP && null == first2;
|
|
}
|
|
tmpResult = tmp(tmp4, obj);
|
|
}
|
|
const intl2 = categoryId(createMode[29]).intl;
|
|
stringResult = intl2.string(categoryId(createMode[29]).t.PDTjLN);
|
|
}
|
|
return tmpResult;
|
|
},
|
|
headerTitle: getSceneTitle(first1, stateFromStores1)
|
|
};
|
|
const setOptions = navigation.setOptions;
|
|
obj2 = NavigatorHeader;
|
|
setOptions(obj);
|
|
}, items2);
|
|
const obj4 = { keyboardShouldPersistTaps: "always", contentContainerStyle: { padding: tmp2(tmp3[14]).space.PX_16, paddingBottom: tmp2(tmp3[14]).space.PX_16 + insets.bottom }, children: closure_22(Stack, obj6) };
|
|
obj6 = { spacing: tmp2(tmp3[14]).space.PX_16, children: items3 };
|
|
({ padding: tmp2(tmp3[14]).space.PX_16, paddingBottom: tmp2(tmp3[14]).space.PX_16 + insets.bottom });
|
|
Stack = tmp4(tmp3[62]).Stack;
|
|
const TextInput = tmp4(tmp3[55]).TextInput;
|
|
const tmp37 = stateFromStores1;
|
|
if (first1 === first3.GUILD_CATEGORY) {
|
|
let intl2 = tmp4(tmp3[29]).intl;
|
|
stringResult = intl2.string(tmp4(tmp3[29]).t.OCAkGP);
|
|
} else {
|
|
let intl = tmp4(tmp3[29]).intl;
|
|
stringResult = intl.string(tmp4(tmp3[29]).t.PVbHDl);
|
|
}
|
|
const name = tmp29.name;
|
|
const obj7 = {
|
|
label: stringResult,
|
|
errorMessage: first5,
|
|
description: stringResult1,
|
|
autoFocus: true,
|
|
enableAndroidSanitizedInputWorkaround: true,
|
|
value,
|
|
onChange: function handleNameChange(arg0) {
|
|
if (first !== arg0) {
|
|
closure_9(sanitizeChannelNameDefault(arg0, first1));
|
|
}
|
|
},
|
|
placeholder: stringResult2
|
|
};
|
|
first5 = undefined;
|
|
if (name != null) {
|
|
first5 = name[0];
|
|
}
|
|
if (first1 === first3.GUILD_FORUM) {
|
|
const intl4 = tmp4(tmp3[29]).intl;
|
|
stringResult1 = intl4.string(tmp4(tmp3[29]).t.qBvLY4);
|
|
} else if (null != stateFromStores1) {
|
|
const intl3 = tmp4(tmp3[29]).intl;
|
|
const format = intl3.format;
|
|
const obj8 = { name: tmp4Result10.computeChannelName(stateFromStores1, tmp11, first2, true) };
|
|
const s2ZzZZ = tmp4(tmp3[29]).t.s2ZzZZ;
|
|
tmp4Result10 = tmp4(tmp3[42]);
|
|
stringResult1 = format(s2ZzZZ, obj8);
|
|
}
|
|
if (first1 === first3.GUILD_CATEGORY) {
|
|
const intl7 = tmp4(tmp3[29]).intl;
|
|
stringResult2 = intl7.string(tmp4(tmp3[29]).t.eTVbtx);
|
|
} else if (first1 === first3.GUILD_FORUM) {
|
|
const intl6 = tmp4(tmp3[29]).intl;
|
|
stringResult2 = intl6.string(tmp4(tmp3[29]).t["5z1Xat"]);
|
|
} else {
|
|
const intl5 = tmp4(tmp3[29]).intl;
|
|
stringResult2 = intl5.string(tmp4(tmp3[29]).t["bw/b8E"]);
|
|
}
|
|
items3 = [closure_20(TextInput, obj7), , ];
|
|
let tmp38Result4 = null;
|
|
if (null == stateFromStores1) {
|
|
let tmp38Result = null;
|
|
if (first1 !== first3.GUILD_CATEGORY) {
|
|
function handleTypeChange(arg0) {
|
|
closure_11(arg0);
|
|
closure_9(sanitizeChannelNameDefault(first, arg0));
|
|
}
|
|
const obj9 = { title: intl12.string(tmp4(tmp3[29]).t["7ZcXG2"]), hasIcons: true, children: items4 };
|
|
const TableRowGroup = tmp4(tmp3[56]).TableRowGroup;
|
|
intl12 = tmp4(tmp3[29]).intl;
|
|
const obj10 = { channelType: first3.GUILD_TEXT, selected: first1 === first3.GUILD_TEXT, isPrivate: first4, onPress: handleTypeChange };
|
|
items4 = [closure_20(closure_27, obj10), , , , , , ];
|
|
obj11 = { channelType: first3.GUILD_VOICE, selected: first1 === first3.GUILD_VOICE, isPrivate: first4, onPress: handleTypeChange };
|
|
items4[1] = closure_20(closure_27, obj11);
|
|
const obj12 = { channelType: first3.GUILD_FORUM, selected: first1 === first3.GUILD_FORUM, isPrivate: first4, onPress: handleTypeChange };
|
|
items4[2] = closure_20(closure_27, obj12);
|
|
let tmp36Result = null;
|
|
if (guildEligibleForMediaChannels) {
|
|
const obj13 = { channelType: first3.GUILD_MEDIA, selected: first1 === first3.GUILD_MEDIA, isPrivate: first4, isBeta: true, onPress: handleTypeChange };
|
|
tmp36Result = tmp36(tmp65, obj13);
|
|
}
|
|
items4[3] = tmp36Result;
|
|
let tmp36Result7 = null;
|
|
if (hasItem) {
|
|
tmp36Result7 = null;
|
|
if (createMode !== tmp4(tmp3[47]).CreateChannelMode.PREMIUM_CHANNEL) {
|
|
const obj14 = { channelType: first3.GUILD_ANNOUNCEMENT, selected: first1 === first3.GUILD_ANNOUNCEMENT, isPrivate: first4, onPress: handleTypeChange };
|
|
tmp36Result7 = tmp36(tmp65, obj14);
|
|
}
|
|
}
|
|
items4[4] = tmp36Result7;
|
|
let tmp36Result8 = null;
|
|
if (canCreateStageChannelByGuild) {
|
|
tmp36Result8 = null;
|
|
if (!first4) {
|
|
const obj15 = { channelType: first3.GUILD_STAGE_VOICE, selected: first1 === first3.GUILD_STAGE_VOICE, isPrivate: first4, onPress: handleTypeChange };
|
|
tmp36Result8 = tmp36(tmp65, obj15);
|
|
}
|
|
}
|
|
items4[5] = tmp36Result8;
|
|
let tmp36Result9 = null;
|
|
if (enabled) {
|
|
const obj16 = { channelType: first3.GUILD_APP, selected: first1 === first3.GUILD_APP, isPrivate: first4, onPress: handleTypeChange };
|
|
tmp36Result9 = tmp36(tmp65, obj16);
|
|
}
|
|
items4[6] = tmp36Result9;
|
|
tmp38Result = tmp38(TableRowGroup, obj9);
|
|
}
|
|
const items5 = [tmp38Result, , , ];
|
|
let tmp36Result10 = null;
|
|
if (first1 === first3.GUILD_APP) {
|
|
const obj17 = { guildId, channelId: categoryId, selectedApplicationId: first2, onChange: tmp25 };
|
|
tmp36Result10 = tmp36(tmp2(tmp3[57]), obj17);
|
|
}
|
|
items5[1] = tmp36Result10;
|
|
const obj18 = { guildId, channelType: first1 };
|
|
items5[2] = closure_20(tmp2(tmp3[58]), obj18);
|
|
let tmp38Result3 = null;
|
|
if (first1 !== first3.GUILD_STAGE_VOICE) {
|
|
tmp38Result3 = null;
|
|
if (createMode !== tmp4(tmp3[47]).CreateChannelMode.PREMIUM_CHANNEL) {
|
|
let stringResult3;
|
|
let stringResult4;
|
|
const TableRowGroup2 = tmp4(tmp3[56]).TableRowGroup;
|
|
if (first1 === first3.GUILD_CATEGORY) {
|
|
const intl9 = tmp4(tmp3[29]).intl;
|
|
stringResult3 = intl9.string(tmp4(tmp3[29]).t.RQUk61);
|
|
} else {
|
|
const tmp58 = canResult1(first1);
|
|
const intl8 = tmp4(tmp3[29]).intl;
|
|
const string = intl8.string;
|
|
const t = tmp4(tmp3[29]).t;
|
|
if (tmp58) {
|
|
stringResult3 = string(t.cLjvKg);
|
|
} else {
|
|
stringResult3 = string(t.hfbjIH);
|
|
}
|
|
}
|
|
const obj19 = { description: stringResult3, hasIcons: true, children: closure_20(TableSwitchRow, obj20) };
|
|
TableSwitchRow = tmp4(tmp3[59]).TableSwitchRow;
|
|
if (first1 === first3.GUILD_CATEGORY) {
|
|
const intl11 = tmp4(tmp3[29]).intl;
|
|
stringResult4 = intl11.string(tmp4(tmp3[29]).t.lEPAZ5);
|
|
} else {
|
|
const intl10 = tmp4(tmp3[29]).intl;
|
|
stringResult4 = intl10.string(tmp4(tmp3[29]).t.aUI70g);
|
|
}
|
|
obj20 = {
|
|
label: stringResult4,
|
|
icon: closure_20(tmp4(tmp3[60]).LockIcon, {}),
|
|
value: first4,
|
|
onValueChange: function handlePrivacyChange(arg0) {
|
|
closure_17(arg0);
|
|
}
|
|
};
|
|
const items6 = [closure_20(TableRowGroup2, obj19), ];
|
|
let tmp36Result11 = null;
|
|
if (null != privateChannelHintText) {
|
|
const obj21 = { style: tmp.errorMessage, children: closure_20(tmp4(tmp3[61]).InlineNotice, obj22) };
|
|
obj22 = { type: "critical", message: privateChannelHintText, role: "status" };
|
|
tmp36Result11 = tmp36(c6, obj21);
|
|
}
|
|
const obj23 = { children: items6 };
|
|
items6[1] = tmp36Result11;
|
|
tmp38Result3 = tmp38(tmp49, obj23);
|
|
}
|
|
}
|
|
const obj24 = { children: items5 };
|
|
items5[3] = tmp38Result3;
|
|
tmp38Result4 = tmp38(tmp49, obj24);
|
|
}
|
|
items3[1] = tmp38Result4;
|
|
let tmp36Result12 = null;
|
|
if (null != tmp14Result5[1].message) {
|
|
const obj25 = { style: tmp.errorMessage, children: closure_20(tmp4(tmp3[61]).InlineNotice, obj26) };
|
|
obj26 = { type: "critical", message: tmp14Result5[1].message, role: "alert" };
|
|
tmp36Result12 = tmp36(c6, obj25);
|
|
}
|
|
items3[2] = tmp36Result12;
|
|
return closure_20(tmp37, obj4);
|
|
});
|
|
let closure_28 = tmp5;
|
|
ReactCompilerGating = ReactCompilerGating_mod;
|
|
let closure_29 = ReactCompilerGating.isReactCompilerEnabled() ? (function AddMembers(guildId) {
|
|
let closure_1;
|
|
let closure_8;
|
|
let first;
|
|
let id;
|
|
let items;
|
|
let obj7;
|
|
let ref;
|
|
let tmp23;
|
|
let tmp26;
|
|
let tmp31;
|
|
let tmp6;
|
|
let tmp8;
|
|
let tmp9;
|
|
_require = guildId;
|
|
let tmp = _require;
|
|
let tmp2 = dependencyMap;
|
|
let obj = require("react");
|
|
const cResult = obj.c(31);
|
|
let tmp4 = closure_23();
|
|
let obj2 = navigation;
|
|
_slicedToArray = navigation.useRef(guildId);
|
|
obj3 = require("useNavigation");
|
|
navigation = obj3.useNavigation();
|
|
if (cResult[0] !== guildId.guildId) {
|
|
const guild = GuildStore.getGuild(guildId.guildId);
|
|
_modDef38(null != guild, "Guild must not be null");
|
|
const currentUser = UserStore.getCurrentUser();
|
|
dependencyMap = currentUser;
|
|
_modDef38(null != currentUser, "AddMembers: user cannot be undefined");
|
|
const canResult = PermissionStore.can(constants2.ADMINISTRATOR, guild);
|
|
importDefault = canResult;
|
|
const tmp22 = isGuildOwner(guild, currentUser);
|
|
cResult[0] = guildId.guildId;
|
|
cResult[1] = guild;
|
|
cResult[2] = canResult;
|
|
cResult[3] = tmp22;
|
|
cResult[4] = currentUser;
|
|
tmp9 = currentUser;
|
|
tmp8 = tmp22;
|
|
tmp6 = guild;
|
|
} else {
|
|
tmp6 = cResult[1];
|
|
importDefault = cResult[2];
|
|
tmp8 = cResult[3];
|
|
dependencyMap = cResult[4];
|
|
}
|
|
let closure_5 = tmp8;
|
|
if (cResult[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
const obj4 = {};
|
|
cResult[5] = obj4;
|
|
tmp23 = obj4;
|
|
} else {
|
|
tmp23 = cResult[5];
|
|
}
|
|
[first, tmp26] = obj2.useState(tmp23);
|
|
const tmp27 = _slicedToArray(useCreateChannelSubmitDefault(guildId.onChannelCreated), 3);
|
|
const first1 = tmp27[0];
|
|
isGuildOwner = tmp30;
|
|
if (cResult[6] !== guildId) {
|
|
const fn = function b() {
|
|
ref.current = current;
|
|
};
|
|
cResult[6] = guildId;
|
|
cResult[7] = fn;
|
|
tmp31 = fn;
|
|
} else {
|
|
tmp31 = cResult[7];
|
|
}
|
|
const effect = obj2.useEffect(tmp31);
|
|
if (cResult[8] === tmp7) {
|
|
if (cResult[9] === tmp8) {
|
|
if (cResult[10] === navigation) {
|
|
if (cResult[11] === tmp27[2]) {
|
|
if (cResult[12] === first) {
|
|
let tmp33;
|
|
if (cResult[13] === tmp9.id) {
|
|
tmp33 = cResult[14];
|
|
}
|
|
let closure_9 = tmp33;
|
|
if (cResult[15] === tmp33) {
|
|
if (cResult[16] === navigation) {
|
|
if (cResult[17] === first) {
|
|
let tmp34;
|
|
let tmp35;
|
|
if (cResult[18] === first1) {
|
|
tmp34 = cResult[19];
|
|
tmp35 = cResult[20];
|
|
}
|
|
const layoutEffect = obj2.useLayoutEffect(tmp34, tmp35);
|
|
if (cResult[21] === tmp27[1].message) {
|
|
let tmp37;
|
|
if (cResult[22] === tmp4.errorMessage) {
|
|
tmp37 = cResult[23];
|
|
}
|
|
if (cResult[24] === tmp6) {
|
|
let tmp41;
|
|
if (cResult[25] === first) {
|
|
tmp41 = cResult[26];
|
|
}
|
|
if (cResult[27] === tmp4.addMembersContainer) {
|
|
if (cResult[28] === tmp37) {
|
|
let tmp45;
|
|
if (cResult[29] === tmp41) {
|
|
tmp45 = cResult[30];
|
|
}
|
|
return tmp45;
|
|
}
|
|
}
|
|
class X {
|
|
constructor() {
|
|
tmp = closure_0;
|
|
tmp2 = closure_2;
|
|
channelType = closure_3.current.channelType;
|
|
intl = closure_0(closure_2[29]).intl;
|
|
closure_0 = intl.string(closure_0(closure_2[29]).t["5Wxrcd"]);
|
|
if (Object.keys(closure_6).length > 0) {
|
|
tmp3 = closure_1_14;
|
|
if (channelType === closure_1_14.GUILD_STAGE_VOICE) {
|
|
intl3 = tmp(tmp2[29]).intl;
|
|
stringResult = intl3.string(tmp(tmp2[29]).t.PDTjLN);
|
|
} else {
|
|
intl2 = tmp(tmp2[29]).intl;
|
|
stringResult = intl2.string(tmp(tmp2[29]).t.CumH4u);
|
|
}
|
|
closure_0 = stringResult;
|
|
}
|
|
obj = {
|
|
headerRight: closure_7 ? (() => closure_1_20(stringResult(id[50]).HeaderSubmittingIndicator, {})) : (() => {
|
|
const obj = { text: stringResult, onPress };
|
|
return closure_20(HeaderActionButton.HeaderActionButton, obj);
|
|
})
|
|
};
|
|
setOptionsResult = closure_4.setOptions(obj);
|
|
return;
|
|
}
|
|
}
|
|
const obj5 = { style: tmp4.addMembersContainer, children: items };
|
|
items = [tmp37, tmp41];
|
|
const tmp47 = closure_22(first, obj5);
|
|
cResult[27] = tmp4.addMembersContainer;
|
|
cResult[28] = tmp37;
|
|
cResult[29] = tmp41;
|
|
cResult[30] = tmp47;
|
|
tmp45 = tmp47;
|
|
}
|
|
class X {
|
|
constructor() {
|
|
tmp = closure_0;
|
|
tmp2 = closure_2;
|
|
channelType = closure_3.current.channelType;
|
|
intl = closure_0(closure_2[29]).intl;
|
|
closure_0 = intl.string(closure_0(closure_2[29]).t["5Wxrcd"]);
|
|
if (Object.keys(closure_6).length > 0) {
|
|
tmp3 = closure_1_14;
|
|
if (channelType === closure_1_14.GUILD_STAGE_VOICE) {
|
|
intl3 = tmp(tmp2[29]).intl;
|
|
stringResult = intl3.string(tmp(tmp2[29]).t.PDTjLN);
|
|
} else {
|
|
intl2 = tmp(tmp2[29]).intl;
|
|
stringResult = intl2.string(tmp(tmp2[29]).t.CumH4u);
|
|
}
|
|
closure_0 = stringResult;
|
|
}
|
|
obj = {
|
|
headerRight: closure_7 ? (() => closure_1_20(stringResult(id[50]).HeaderSubmittingIndicator, {})) : (() => {
|
|
const obj = { text: stringResult, onPress };
|
|
return closure_20(HeaderActionButton.HeaderActionButton, obj);
|
|
})
|
|
};
|
|
setOptionsResult = closure_4.setOptions(obj);
|
|
return;
|
|
}
|
|
}
|
|
tmp43[1] = tmp6;
|
|
tmp43[2] = first;
|
|
tmp43[3] = tmp26;
|
|
const tmp44 = closure_20(tmp(8620).AddMembersBody, tmp43);
|
|
cResult[24] = tmp6;
|
|
cResult[25] = first;
|
|
cResult[26] = tmp44;
|
|
tmp41 = tmp44;
|
|
}
|
|
class X {
|
|
constructor() {
|
|
tmp = closure_0;
|
|
tmp2 = closure_2;
|
|
channelType = closure_3.current.channelType;
|
|
intl = closure_0(closure_2[29]).intl;
|
|
closure_0 = intl.string(closure_0(closure_2[29]).t["5Wxrcd"]);
|
|
if (Object.keys(closure_6).length > 0) {
|
|
tmp3 = closure_1_14;
|
|
if (channelType === closure_1_14.GUILD_STAGE_VOICE) {
|
|
intl3 = tmp(tmp2[29]).intl;
|
|
stringResult = intl3.string(tmp(tmp2[29]).t.PDTjLN);
|
|
} else {
|
|
intl2 = tmp(tmp2[29]).intl;
|
|
stringResult = intl2.string(tmp(tmp2[29]).t.CumH4u);
|
|
}
|
|
closure_0 = stringResult;
|
|
}
|
|
obj = {
|
|
headerRight: closure_7 ? (() => closure_1_20(stringResult(id[50]).HeaderSubmittingIndicator, {})) : (() => {
|
|
const obj = { text: stringResult, onPress };
|
|
return closure_20(HeaderActionButton.HeaderActionButton, obj);
|
|
})
|
|
};
|
|
setOptionsResult = closure_4.setOptions(obj);
|
|
return;
|
|
}
|
|
}
|
|
let tmp38 = null;
|
|
if (null != tmp27[1].message) {
|
|
tmp38 = null;
|
|
if ("" !== tmp27[1].message) {
|
|
const obj6 = { style: null, children: closure_20(tmp(7568).InlineNotice, obj7) };
|
|
class X {
|
|
constructor() {
|
|
tmp = closure_0;
|
|
tmp2 = closure_2;
|
|
channelType = closure_3.current.channelType;
|
|
intl = closure_0(closure_2[29]).intl;
|
|
closure_0 = intl.string(closure_0(closure_2[29]).t["5Wxrcd"]);
|
|
if (Object.keys(closure_6).length > 0) {
|
|
tmp3 = closure_1_14;
|
|
if (channelType === closure_1_14.GUILD_STAGE_VOICE) {
|
|
intl3 = tmp(tmp2[29]).intl;
|
|
stringResult = intl3.string(tmp(tmp2[29]).t.PDTjLN);
|
|
} else {
|
|
intl2 = tmp(tmp2[29]).intl;
|
|
stringResult = intl2.string(tmp(tmp2[29]).t.CumH4u);
|
|
}
|
|
closure_0 = stringResult;
|
|
}
|
|
obj = {
|
|
headerRight: closure_7 ? (() => closure_1_20(stringResult(id[50]).HeaderSubmittingIndicator, {})) : (() => {
|
|
const obj = { text: stringResult, onPress };
|
|
return closure_20(HeaderActionButton.HeaderActionButton, obj);
|
|
})
|
|
};
|
|
setOptionsResult = closure_4.setOptions(obj);
|
|
return;
|
|
}
|
|
}
|
|
obj7 = { type: "critical", message: tmp27[1].message, role: "alert" };
|
|
tmp38 = closure_20(first, obj6);
|
|
}
|
|
}
|
|
cResult[21] = tmp27[1].message;
|
|
cResult[22] = tmp4.errorMessage;
|
|
cResult[23] = tmp38;
|
|
tmp37 = tmp38;
|
|
}
|
|
}
|
|
}
|
|
class X {
|
|
constructor() {
|
|
tmp = closure_0;
|
|
tmp2 = closure_2;
|
|
channelType = closure_3.current.channelType;
|
|
intl = closure_0(closure_2[29]).intl;
|
|
closure_0 = intl.string(closure_0(closure_2[29]).t["5Wxrcd"]);
|
|
if (Object.keys(closure_6).length > 0) {
|
|
tmp3 = closure_1_14;
|
|
if (channelType === closure_1_14.GUILD_STAGE_VOICE) {
|
|
intl3 = tmp(tmp2[29]).intl;
|
|
stringResult = intl3.string(tmp(tmp2[29]).t.PDTjLN);
|
|
} else {
|
|
intl2 = tmp(tmp2[29]).intl;
|
|
stringResult = intl2.string(tmp(tmp2[29]).t.CumH4u);
|
|
}
|
|
closure_0 = stringResult;
|
|
}
|
|
obj = {
|
|
headerRight: closure_7 ? (() => closure_1_20(stringResult(id[50]).HeaderSubmittingIndicator, {})) : (() => {
|
|
const obj = { text: stringResult, onPress };
|
|
return closure_20(HeaderActionButton.HeaderActionButton, obj);
|
|
})
|
|
};
|
|
setOptionsResult = closure_4.setOptions(obj);
|
|
return;
|
|
}
|
|
}
|
|
const items1 = [navigation, first, first1, tmp33];
|
|
cResult[15] = tmp33;
|
|
cResult[16] = navigation;
|
|
cResult[17] = first;
|
|
cResult[18] = first1;
|
|
cResult[19] = X;
|
|
cResult[20] = items1;
|
|
tmp35 = items1;
|
|
tmp34 = X;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
class R {
|
|
constructor() {
|
|
current = closure_3.current;
|
|
({ guildId, channelType } = current);
|
|
({ name, categoryId, applicationId, onChannelCreated, flags } = current);
|
|
tmp = closure_0;
|
|
tmp2 = closure_2;
|
|
obj = closure_0(closure_2[63]);
|
|
result = obj.permissionOverwritesForRoles(guildId, channelType, [], true);
|
|
closure_1 = result;
|
|
values = Object.values(closure_6);
|
|
item = values.forEach((row) => {
|
|
row = row.row;
|
|
const tmp = null != row.id && "" !== row.id;
|
|
if (tmp) {
|
|
if (row.rowType === constants.ROLE) {
|
|
const push2 = result.push;
|
|
const obj2 = current(id[63]);
|
|
push2(obj2.permissionOverwriteForRole(row.id, channelType));
|
|
} else if (row.rowType === tmp2.MEMBER) {
|
|
const push = result.push;
|
|
const obj = current(id[63]);
|
|
push(obj.permissionOverwriteForUser(row.id, channelType));
|
|
}
|
|
}
|
|
});
|
|
tmp4 = closure_1 || closure_5;
|
|
if (!tmp4) {
|
|
push = result.push;
|
|
tmpResult = tmp(tmp2[63]);
|
|
tmp5 = closure_2;
|
|
arr1 = push(tmpResult.permissionOverwriteForUser(closure_2.id, channelType));
|
|
}
|
|
obj1 = { overwrites: result, guildId, channelType, name, categoryId, applicationId, flags };
|
|
if (channelType === ChannelTypes.GUILD_STAGE_VOICE) {
|
|
tmp9 = closure_4;
|
|
tmp10 = closure_31;
|
|
obj5 = {};
|
|
tmp11 = obj5;
|
|
tmp12 = obj1;
|
|
push2 = closure_4.push;
|
|
ADD_MODERATORS = closure_31.ADD_MODERATORS;
|
|
merged = Object.assign(obj1);
|
|
obj5.guildId = guildId;
|
|
obj5.onChannelCreated = onChannelCreated;
|
|
push2Result = push2(ADD_MODERATORS, obj5);
|
|
} else {
|
|
tmp7 = closure_8;
|
|
tmp8 = closure_8(obj1);
|
|
}
|
|
return;
|
|
}
|
|
}
|
|
cResult[8] = tmp7;
|
|
cResult[9] = tmp8;
|
|
cResult[10] = navigation;
|
|
cResult[11] = tmp27[2];
|
|
cResult[12] = first;
|
|
cResult[13] = tmp9.id;
|
|
cResult[14] = R;
|
|
tmp33 = R;
|
|
}) : (function AddMembers(guildId) {
|
|
let closure_8;
|
|
let items2;
|
|
let obj4;
|
|
let ref;
|
|
_require = guildId;
|
|
let tmp = closure_23();
|
|
importDefault = react.useRef(guildId);
|
|
let tmp2 = _require;
|
|
let obj = require("useNavigation");
|
|
navigation = obj.useNavigation();
|
|
const guild = GuildStore.getGuild(guildId.guildId);
|
|
require("module_38")(null != guild, "Guild must not be null");
|
|
const currentUser = UserStore.getCurrentUser();
|
|
const tmp8 = require("module_38")(null != currentUser, "AddMembers: user cannot be undefined");
|
|
const canResult = PermissionStore.can(constants2.ADMINISTRATOR, guild);
|
|
react = canResult;
|
|
const tmp10 = isGuildOwner(guild, currentUser);
|
|
let closure_5 = tmp10;
|
|
const tmp11 = currentUser(react.useState({}), 2);
|
|
const pendingAdditions = tmp11[0];
|
|
const tmp13 = tmp11[1];
|
|
const tmp14 = currentUser(require("useCreateChannelSubmit")(guildId.onChannelCreated), 3);
|
|
const first1 = tmp14[0];
|
|
isGuildOwner = tmp17;
|
|
const effect = react.useEffect(() => {
|
|
ref.current = current;
|
|
});
|
|
const items = [canResult, tmp10, navigation, tmp14[2], pendingAdditions, currentUser.id];
|
|
const onPress = react.useCallback(() => {
|
|
let applicationId;
|
|
let categoryId;
|
|
let channelType;
|
|
let flags;
|
|
let guildId;
|
|
let name;
|
|
let onChannelCreated;
|
|
current = ref.current;
|
|
({ guildId, channelType } = current);
|
|
({ name, categoryId, applicationId, onChannelCreated, flags } = current);
|
|
let tmp = require;
|
|
const tmp2 = dependencyMap;
|
|
let obj = ChannelUtils;
|
|
const result = obj.permissionOverwritesForRoles(guildId, channelType, [], true);
|
|
const values = Object.values(first);
|
|
const item = values.forEach((row) => {
|
|
row = row.row;
|
|
const tmp = null != row.id && "" !== row.id;
|
|
if (tmp) {
|
|
if (row.rowType === constants.ROLE) {
|
|
const push2 = result.push;
|
|
const obj2 = current(navigation[63]);
|
|
push2(obj2.permissionOverwriteForRole(row.id, channelType));
|
|
} else if (row.rowType === tmp2.MEMBER) {
|
|
const push = result.push;
|
|
const obj = current(navigation[63]);
|
|
push(obj.permissionOverwriteForUser(row.id, channelType));
|
|
}
|
|
}
|
|
});
|
|
const tmp4 = react || closure_5;
|
|
if (!tmp4) {
|
|
let push = result.push;
|
|
const tmpResult = ChannelUtils;
|
|
push(tmpResult.permissionOverwriteForUser(currentUser.id, channelType));
|
|
}
|
|
let obj2 = { overwrites: result, guildId, channelType, name, categoryId, applicationId, flags };
|
|
if (channelType === ChannelTypes.GUILD_STAGE_VOICE) {
|
|
obj3 = { guildId, onChannelCreated };
|
|
let push2 = navigation.push;
|
|
const ADD_MODERATORS = constants2.ADD_MODERATORS;
|
|
const merged = Object.assign(obj2);
|
|
push2(ADD_MODERATORS, obj3);
|
|
} else {
|
|
closure_8(obj2);
|
|
}
|
|
}, items);
|
|
const items1 = [navigation, pendingAdditions, first1, onPress];
|
|
const layoutEffect = react.useLayoutEffect(() => {
|
|
const channelType = ref.current.channelType;
|
|
const intl = current(navigation[29]).intl;
|
|
current = intl.string(current(navigation[29]).t["5Wxrcd"]);
|
|
if (Object.keys(first).length > 0) {
|
|
let stringResult;
|
|
if (channelType === constants.GUILD_STAGE_VOICE) {
|
|
const intl3 = tmp(tmp2[29]).intl;
|
|
stringResult = intl3.string(tmp(tmp2[29]).t.PDTjLN);
|
|
} else {
|
|
const intl2 = tmp(tmp2[29]).intl;
|
|
stringResult = intl2.string(tmp(tmp2[29]).t.CumH4u);
|
|
}
|
|
current = stringResult;
|
|
}
|
|
let obj = {
|
|
headerRight: first1 ? (() => closure_1_20(stringResult(navigation[50]).HeaderSubmittingIndicator, {})) : (() => {
|
|
const obj = { text: stringResult, onPress };
|
|
return closure_20(HeaderActionButton.HeaderActionButton, obj);
|
|
})
|
|
};
|
|
navigation.setOptions(obj);
|
|
}, items1);
|
|
let obj2 = { style: tmp.addMembersContainer, children: items2 };
|
|
let tmp23 = null;
|
|
const tmp21 = closure_22;
|
|
if (null != tmp14[1].message) {
|
|
tmp23 = null;
|
|
if ("" !== tmp14[1].message) {
|
|
obj3 = { style: tmp.errorMessage, children: closure_20(tmp2(tmp3[61]).InlineNotice, obj4) };
|
|
obj4 = { type: "critical", message: tmp14[1].message, role: "alert" };
|
|
tmp23 = closure_20(tmp22, obj3);
|
|
}
|
|
}
|
|
items2 = [tmp23, closure_20(tmp2(tmp3[64]).AddMembersBody, { channel: null, guild, pendingAdditions, setPendingAdditions: tmp13 })];
|
|
return tmp21(pendingAdditions, obj2);
|
|
});
|
|
const constants4 = { CREATE_CHANNEL: "CREATE_CHANNEL", ADD_MEMBERS: "ADD_MEMBERS", ADD_MODERATORS: "ADD_MODERATORS" };
|
|
ReactCompilerGating = ReactCompilerGating_mod;
|
|
let tmp6 = ReactCompilerGating.isReactCompilerEnabled() ? (function CreateChannelModal(arg0) {
|
|
let closure_0;
|
|
let initialStack;
|
|
let screens;
|
|
let tmp4;
|
|
_require = arg0;
|
|
let obj = require("react");
|
|
const cResult = obj.c(5);
|
|
const tmp = _require;
|
|
if (cResult[0] !== arg0) {
|
|
const fn = function t() {
|
|
let obj2;
|
|
const obj = { name: constants.CREATE_CHANNEL, params: obj2 };
|
|
obj2 = {};
|
|
const merged = Object.assign(closure_0);
|
|
const items = [obj];
|
|
obj3 = { screens: getScreens(), initialStack: items };
|
|
return obj3;
|
|
};
|
|
cResult[0] = arg0;
|
|
cResult[1] = fn;
|
|
tmp4 = fn;
|
|
} else {
|
|
tmp4 = cResult[1];
|
|
}
|
|
({ screens, initialStack } = useInitialValueDefault(tmp4));
|
|
useInitialValueDefault(tmp4);
|
|
if (cResult[2] === initialStack) {
|
|
let tmp6;
|
|
if (cResult[3] === screens) {
|
|
tmp6 = cResult[4];
|
|
}
|
|
return tmp6;
|
|
}
|
|
const tmp7 = closure_20(tmp(6688).Navigator, { screens, initialRouteStack: initialStack });
|
|
cResult[2] = initialStack;
|
|
cResult[3] = screens;
|
|
cResult[4] = tmp7;
|
|
tmp6 = tmp7;
|
|
}) : (function CreateChannelModal(arg0) {
|
|
let closure_0;
|
|
let initialStack;
|
|
let screens;
|
|
const f99048 = () => {
|
|
let obj2;
|
|
const obj = { name: constants.CREATE_CHANNEL, params: obj2 };
|
|
obj2 = {};
|
|
const merged = Object.assign(closure_0);
|
|
const items = [obj];
|
|
obj3 = { screens: getScreens(), initialStack: items };
|
|
return obj3;
|
|
};
|
|
_require = arg0;
|
|
({ screens, initialStack } = useInitialValueDefault(f99048));
|
|
useInitialValueDefault(f99048);
|
|
return closure_20(require("Navigator").Navigator, { screens, initialRouteStack });
|
|
});
|
|
let result = size.fileFinishedImporting("components_native/CreateChannelModal.tsx");
|
|
|
|
export default tmp6;
|
|
export const CreateChannel = tmp5;
|