decord/source/modules/guild_onboarding/native/CustomizeCommunity.tsx

560 lines
27 KiB
TypeScript
Raw Normal View History

// Module ID: 11679
// Function ID: 11680
// Name: CustomizeCommunity
// Dependencies: [19, 17, 5540, 1979, 4651, 4458, 7203, 7204, 1074, 1374, 4818, 21, 4636, 576, 5605, 4345, 4571, 504, 11680, 11681, 1178, 1114, 4632, 7209, 7228, 7263, 7285, 1611, 11682, 7202, 7213, 7208, 7233, 1396, 1369, 4338, 4373, 4637, 11683, 4603, 7238, 1896, 5204, 7261, 7229, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 11679 (CustomizeCommunity)
import nativeDefault from "native" /* 576 */;
import asyncRequireImpl from "asyncRequireImpl" /* 1896 */;
import ReanimatedRexport from "ReanimatedRexport" /* 4373 */;
import useThemeDefault from "useTheme" /* 4571 */;
import ActionSheetActionCreatorsDefault from "ActionSheetActionCreators" /* 4603 */;
import Text_Text from "Text/Text" /* 4632 */;
import timing from "timing" /* 4637 */;
import GuildOnboardingPromptsActionCreators from "GuildOnboardingPromptsActionCreators" /* 7202 */;
import GuildOnboardingUtils from "GuildOnboardingUtils" /* 7209 */;
import EmojiDefault from "Emoji" /* 7233 */;
import ConnectionCardDefault from "ConnectionCard" /* 7263 */;
import AnalyticsLocationDefault from "AnalyticsLocation" /* 7285 */;
import noop from "module_19" /* 19 */;
import EmojiStore from "EmojiStore" /* 5540 */;
import GuildStore from "GuildStore" /* 1979 */;
import ReadStateStore from "ReadStateStore" /* 4651 */;
import SelectedGuildStore from "SelectedGuildStore" /* 4458 */;
import GuildOnboardingPromptsStore from "GuildOnboardingPromptsStore" /* 7203 */;
import TextStyles from "TextStyles" /* 5605 */;
2026-07-23 10:11:24 +00:00
require = fn;
2026-07-20 16:05:17 +00:00
function EmptyCustomizeCommunity(setTab) {
2026-07-23 10:11:24 +00:00
setTab = setTab.setTab;
2026-08-24 06:08:38 +00:00
importDefault = undefined;
const tmp = closure_19();
const obj = setTab(4345);
const tmp4 = importDefault;
const isThemeDarkResult = setTab(4345).isThemeDark(useThemeDefault());
const items = [SelectedGuildStore];
importDefault = setTab(504).useStateFromStores(items, () => guildId.getGuildId());
const obj3 = { style: tmp.emptyContainer, children: null };
const obj2 = setTab(504);
const items1 = [closure_16(closure_5, { style: tmp.emptyContainerImage, source: tmp4(isThemeDarkResult ? 11680 : 11681) }), , ];
const obj5 = { style: tmp.emptyContainerHeader, children: null };
const intl = tmp2(1114).intl;
obj5.children = intl.string(setTab(1114).t.leKHQz);
items1[1] = closure_16(setTab(1178).LegacyText, obj5);
const obj6 = { variant: "text-sm/medium", color: "text-subtle", children: null };
const intl2 = tmp2(1114).intl;
obj6.children = intl2.format(setTab(1114).t["jH+ktB"], {
2026-07-20 16:05:17 +00:00
onBrowseChannels() {
if (null != closure_1) {
setTab(constants.BROWSE);
2026-07-20 16:05:17 +00:00
}
}
});
items1[2] = closure_16(setTab(4632).Text, obj6);
obj3.children = items1;
return closure_17(closure_4, obj3);
2026-07-20 16:05:17 +00:00
}
function PromptTitle(item) {
item = item.item;
const obj = { style: closure_19().titleContainer, children: null };
2026-07-20 16:05:17 +00:00
const items = [item.title, ];
2026-07-29 08:29:29 +00:00
let tmp3Result = null;
2026-07-20 16:05:17 +00:00
if (item.required) {
const obj2 = { variant: "text-md/bold", color: "text-feedback-critical", children: [" ", "*"] };
tmp3Result = tmp3(Text_Text.Text, obj2);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
items[1] = tmp3Result;
obj.children = closure_1_17(Text_Text.Heading, { variant: "text-md/semibold", color: "mobile-text-heading-primary", children: items });
return value2(React4, obj);
2026-07-20 16:05:17 +00:00
}
function PromptHelpText(arg0) {
2026-07-23 10:11:24 +00:00
({ guildId: require, prompt: _prompt, selectedOptionIds: importDefault } = arg0);
const tmp = closure_19();
const tmp2 = require;
const items = [GuildStore];
2026-07-20 16:05:17 +00:00
let found;
const stateFromStores = require("initialize").useStateFromStores(items, () => GuildStore.getGuild(require));
2026-07-29 08:29:29 +00:00
if (_prompt != null) {
2026-07-20 16:05:17 +00:00
const options = _prompt.options;
2026-07-29 08:29:29 +00:00
if (options != null) {
found = options.filter((id) => importDefault.includes(id.id));
2026-07-20 16:05:17 +00:00
}
}
const items1 = [found];
const items2 = [found];
const memo = noop.useMemo(() => {
2026-07-20 16:05:17 +00:00
if (null != found) {
let selectedRoleIds = GuildOnboardingUtils.getSelectedRoleIds(tmp);
2026-07-20 16:05:17 +00:00
} else {
const _Set = Set;
selectedRoleIds = new Set();
}
return selectedRoleIds;
}, items1);
const memo1 = noop.useMemo(() => {
2026-07-20 16:05:17 +00:00
if (null != found) {
let selectedChannelIds = GuildOnboardingUtils.getSelectedChannelIds(tmp);
2026-07-20 16:05:17 +00:00
} else {
const _Set = Set;
selectedChannelIds = new Set();
}
return selectedChannelIds;
}, items2);
let obj = require("initialize");
const obj2 = {
2026-07-20 16:05:17 +00:00
guild: stateFromStores,
prompt: _prompt,
selectedRoleIds: memo,
selectedChannelIds: memo1,
itemHook(children, arg1) {
return closure_1_16(require("Text/Text").Text, { variant: "text-xs/medium", color: "mobile-text-heading-primary", children }, arg1);
2026-07-20 16:05:17 +00:00
}
};
({ helpText, helpTextAdditional } = require("usePromptHelpText")({
guild: stateFromStores,
prompt: _prompt,
selectedRoleIds: memo,
selectedChannelIds: memo1,
itemHook(children, arg1) {
return closure_1_16(require("Text/Text").Text, { variant: "text-xs/medium", color: "mobile-text-heading-primary", children }, arg1);
}
}));
2026-07-20 16:05:17 +00:00
if ("" !== helpText) {
const obj3 = { style: tmp.helpText, variant: "text-xs/medium", color: "text-default", children: null };
2026-07-20 16:05:17 +00:00
const items3 = [helpText, " ", helpTextAdditional];
obj3.children = items3;
let tmp9 = closure_17(tmp2(tmp3[22]).Text, obj3);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
tmp9 = null;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp9;
2026-07-20 16:05:17 +00:00
}
function ConnectionsPrompt(guildId) {
2026-07-23 10:11:24 +00:00
guildId = guildId.guildId;
const tmp = closure_19();
const items = [GuildOnboardingPromptsStore];
const stateFromStores = guildId(504).useStateFromStores(items, () => GuildOnboardingPromptsStore.getConnections(guildId));
2026-07-29 08:29:29 +00:00
let tmp4 = null;
2026-07-20 16:05:17 +00:00
if (0 !== stateFromStores.length) {
const obj2 = { style: tmp.connectionsPromptContainer, children: null };
const obj3 = { style: tmp.connectionsTitle, variant: "text-md/semibold", color: "mobile-text-heading-primary", children: null };
const intl = tmp2(1114).intl;
obj3.children = intl.string(tmp2(1114).t.eDVMrA);
const items1 = [closure_16(tmp2(4632).Text, obj3), , ];
const obj4 = { variant: "text-xs/medium", color: "text-muted", children: null };
const intl2 = tmp2(1114).intl;
obj4.children = intl2.string(tmp2(1114).t.BozOXu);
items1[1] = closure_16(tmp2(4632).Text, obj4);
const obj5 = {
style: tmp.connectionsContainer,
children: stateFromStores.map((connection, index) => {
const obj = { connection, guildId, location: AnalyticsLocationDefault.CHANNELS_AND_ROLES };
return value2(ConnectionCardDefault, obj, index);
})
};
items1[2] = closure_16(closure_4, obj5);
obj2.children = items1;
tmp4 = closure_17(closure_4, obj2);
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
}
function DropdownOption(option) {
option = option.option;
const tmp = closure_19();
const items = [EmojiStore];
const stateFromStores = option(504).useStateFromStores(items, () => {
2026-07-20 16:05:17 +00:00
const emoji = option.emoji;
let id;
2026-07-29 08:29:29 +00:00
if (emoji != null) {
2026-07-20 16:05:17 +00:00
id = emoji.id;
}
let usableCustomEmojiById = null;
if (null != id) {
const emoji2 = option.emoji;
let id1;
2026-07-29 08:29:29 +00:00
if (emoji2 != null) {
2026-07-20 16:05:17 +00:00
id1 = emoji2.id;
}
usableCustomEmojiById = EmojiStore.getUsableCustomEmojiById(id1);
2026-07-20 16:05:17 +00:00
}
return usableCustomEmojiById;
});
2026-07-23 10:11:24 +00:00
let emoji = option.emoji;
2026-07-20 16:05:17 +00:00
let id;
2026-07-29 08:29:29 +00:00
if (emoji != null) {
2026-07-20 16:05:17 +00:00
id = emoji.id;
}
2026-07-29 08:29:29 +00:00
let tmp10Result = null != id;
if (!tmp10Result) {
2026-07-23 10:11:24 +00:00
let emoji2 = option.emoji;
2026-07-20 16:05:17 +00:00
let name;
2026-07-29 08:29:29 +00:00
if (emoji2 != null) {
2026-07-20 16:05:17 +00:00
name = emoji2.name;
}
2026-07-29 08:29:29 +00:00
tmp10Result = null != name;
2026-07-20 16:05:17 +00:00
}
const obj2 = { style: tmp.dropdownPill, children: null };
2026-07-29 08:29:29 +00:00
if (tmp10Result) {
const obj3 = { style: tmp.emojiContainer, children: null };
const obj5 = { textEmojiStyle: null, fastImageStyle: null, src: null, name: null };
({ optionTextEmoji: obj4.textEmojiStyle, optionImageEmoji: obj4.fastImageStyle } = tmp);
2026-07-20 16:05:17 +00:00
let emojiURL;
if (null != stateFromStores) {
const obj7 = { id: null, animated: null, size: null };
({ id: obj6.id, animated: obj6.animated } = stateFromStores);
obj7.size = EMOJI_URL_BASE_SIZE;
emojiURL = tmp11(1396).getEmojiURL(obj7);
const tmp11Result = tmp11(1396);
2026-07-20 16:05:17 +00:00
}
obj5.src = emojiURL;
2026-07-20 16:05:17 +00:00
const emoji3 = option.emoji;
2026-07-29 08:29:29 +00:00
let str;
if (emoji3 != null) {
str = emoji3.name;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (str == null) {
str = "";
2026-07-20 16:05:17 +00:00
}
obj5.name = str;
obj3.children = closure_16(EmojiDefault, obj5);
tmp10Result = tmp10(tmp9, obj3);
2026-07-29 08:29:29 +00:00
tmp11 = importDefault;
2026-07-20 16:05:17 +00:00
}
const items1 = [tmp10Result, closure_16(option(4632).Text, { variant: "text-md/semibold", children: option.title })];
obj2.children = items1;
return closure_17(closure_4, obj2);
2026-07-20 16:05:17 +00:00
}
function DropdownPrompt(guildId) {
guildId = guildId.guildId;
const _prompt = guildId.prompt;
const tmp = closure_19();
const isNew = _prompt.isNew;
const items = [GuildOnboardingPromptsStore];
const stateFromStoresArray = guildId(isNew[17]).useStateFromStoresArray(items, () => GuildOnboardingPromptsStore.getOnboardingResponsesForPrompt(guildId, _prompt.id));
const mapped = stateFromStoresArray.map((item) => {
closure_0 = item;
2026-07-20 16:05:17 +00:00
const options = _prompt.options;
2026-07-23 10:11:24 +00:00
return options.find((id) => id.id === closure_0);
2026-07-20 16:05:17 +00:00
});
2026-07-23 10:11:24 +00:00
const found = mapped.filter(guildId(isNew[34]).isNotNullish);
let obj = guildId(isNew[17]);
const token = guildId(isNew[35]).useToken(_prompt(isNew[13]).colors.BACKGROUND_BRAND);
let obj2 = guildId(isNew[35]);
let tmp4 = _prompt;
2026-07-20 16:05:17 +00:00
const fn = function c() {
if (isNew) {
let combined = concat(tmp, "FF");
2026-07-29 08:29:29 +00:00
let tmp3 = tmp;
2026-07-20 16:05:17 +00:00
} else {
combined = concat(tmp, "00");
2026-07-29 08:29:29 +00:00
tmp3 = tmp;
2026-07-20 16:05:17 +00:00
}
const obj = { borderColor: null };
const obj2 = ReanimatedRexport;
const obj4 = { duration: 1, easing: null };
const Easing = ReanimatedRexport.Easing;
obj4.easing = Easing.in(ReanimatedRexport.Easing.ease);
const withTimingResult = timing.withTiming(combined, obj4);
const obj5 = ReanimatedRexport;
const obj7 = { duration: 300, easing: null };
2026-07-29 08:29:29 +00:00
const combined1 = "" + tmp3 + "00";
const Easing2 = ReanimatedRexport.Easing;
obj7.easing = Easing2.out(ReanimatedRexport.Easing.ease);
obj.borderColor = obj2.withSequence(withTimingResult, obj5.withDelay(500, timing.withTiming(combined1, obj7)));
2026-07-20 16:05:17 +00:00
return obj;
};
let obj3 = guildId(isNew[36]);
fn.__closure = { isNew, brandColor: token, withSequence: guildId(isNew[36]).withSequence, withTiming: guildId(isNew[37]).withTiming, Easing: guildId(isNew[36]).Easing, withDelay: guildId(isNew[36]).withDelay };
2026-07-20 16:05:17 +00:00
fn.__workletHash = 16609373875235;
fn.__initData = __initData;
const animatedStyle = obj3.useAnimatedStyle(fn);
const handleSelectOption = _prompt(isNew[38])(guildId).handleSelectOption;
2026-07-20 16:05:17 +00:00
const items1 = [guildId, _prompt, handleSelectOption, stateFromStoresArray.length];
2026-07-23 10:11:24 +00:00
const callback = stateFromStoresArray.useCallback(() => {
ActionSheetActionCreatorsDefault.openLazy(asyncRequireImpl(7238, dependencyMap.paths), "DropdownOptions", {
2026-07-20 16:05:17 +00:00
guildId,
promptId: _prompt.id,
onSelect(arg0, arg1) {
2026-07-29 08:29:29 +00:00
let flag = arg1;
required = !arg1;
2026-07-29 08:29:29 +00:00
if (!arg1) {
required = required.required;
2026-07-20 16:05:17 +00:00
}
if (required) {
2026-07-29 08:29:29 +00:00
required = 1 === length.length;
2026-07-20 16:05:17 +00:00
}
if (!required) {
2026-07-29 08:29:29 +00:00
if (flag == null) {
flag = false;
2026-07-20 16:05:17 +00:00
}
handleSelectOption(required, arg0, flag);
2026-07-20 16:05:17 +00:00
}
},
canBeNew: !_prompt.isNew,
returnToCustomize: true
});
2026-07-20 16:05:17 +00:00
}, items1);
let obj5 = { style: null, children: null };
const items2 = [tmp.promptContainer, animatedStyle];
obj5.style = items2;
2026-07-20 16:05:17 +00:00
let isNew2 = _prompt.isNew;
if (isNew2) {
let obj7 = { color: tmp2(tmp3[20]).BadgeColors.BRAND, text: null, style: null, textStyle: null };
2026-07-29 08:29:29 +00:00
const intl = tmp2(tmp3[21]).intl;
obj7.text = intl.string(tmp2(tmp3[21]).t.y2b7CA);
({ badge: obj6.style, badgeText: obj6.textStyle } = tmp);
isNew2 = closure_16(tmp2(tmp3[20]).TextBadge, obj7);
2026-07-20 16:05:17 +00:00
}
const items3 = [isNew2, closure_16(PromptTitle, { item: _prompt }), , ];
const obj8 = { style: tmp.dropdownContainer, onPress: callback, children: null };
2026-07-29 08:29:29 +00:00
let tmp10Result = 0 === found.length;
if (tmp10Result) {
const obj9 = { style: tmp.emptyDropdownText, variant: "text-sm/normal", color: "text-muted", children: null };
2026-07-29 08:29:29 +00:00
const intl2 = tmp2(tmp3[21]).intl;
obj9.children = intl2.string(tmp2(tmp3[21]).t.GmSvdA);
tmp10Result = tmp10(tmp2(tmp3[22]).Text, obj9);
2026-07-20 16:05:17 +00:00
}
const items4 = [tmp10Result, found.map((option) => closure_1_16(DropdownOption, { option }, option.id)), ];
const obj10 = { style: tmp.dropdownIconContainer, children: null };
let obj4 = { isNew, brandColor: token, withSequence: guildId(isNew[36]).withSequence, withTiming: guildId(isNew[37]).withTiming, Easing: guildId(isNew[36]).Easing, withDelay: guildId(isNew[36]).withDelay };
obj10.children = closure_16(handleSelectOption, { style: tmp.dropdownIcon, source: tmp4(isNew[43]) });
items4[2] = closure_16(token, obj10);
obj8.children = items4;
items3[2] = closure_17(guildId(isNew[42]).PressableHighlight, obj8);
items3[3] = closure_16(PromptHelpText, { guildId, prompt: _prompt, selectedOptionIds: stateFromStoresArray });
obj5.children = items3;
return closure_17(_prompt(isNew[36]).View, obj5);
2026-07-20 16:05:17 +00:00
}
function MultipleChoicePrompt(guildId) {
guildId = guildId.guildId;
const _prompt = guildId.prompt;
const tmp = closure_19();
const isNew = _prompt.isNew;
const items = [GuildOnboardingPromptsStore];
const stateFromStoresArray = guildId(isNew[17]).useStateFromStoresArray(items, () => GuildOnboardingPromptsStore.getOnboardingResponsesForPrompt(guildId, _prompt.id));
const handleSelectOption = _prompt(isNew[38])(guildId).handleSelectOption;
2026-07-23 10:11:24 +00:00
let obj = guildId(isNew[17]);
const token = guildId(isNew[35]).useToken(_prompt(isNew[13]).colors.BACKGROUND_BRAND);
let obj2 = guildId(isNew[35]);
2026-07-29 08:29:29 +00:00
const fn = function p() {
2026-07-20 16:05:17 +00:00
if (isNew) {
let combined = concat(tmp, "FF");
2026-07-29 08:29:29 +00:00
let tmp3 = tmp;
2026-07-20 16:05:17 +00:00
} else {
combined = concat(tmp, "00");
2026-07-29 08:29:29 +00:00
tmp3 = tmp;
2026-07-20 16:05:17 +00:00
}
const obj = { borderColor: null };
const obj2 = ReanimatedRexport;
const obj4 = { duration: 1, easing: null };
const Easing = ReanimatedRexport.Easing;
obj4.easing = Easing.in(ReanimatedRexport.Easing.ease);
const withTimingResult = timing.withTiming(combined, obj4);
const obj5 = ReanimatedRexport;
const obj7 = { duration: 300, easing: null };
2026-07-29 08:29:29 +00:00
const combined1 = "" + tmp3 + "00";
const Easing2 = ReanimatedRexport.Easing;
obj7.easing = Easing2.out(ReanimatedRexport.Easing.ease);
obj.borderColor = obj2.withSequence(withTimingResult, obj5.withDelay(500, timing.withTiming(combined1, obj7)));
2026-07-20 16:05:17 +00:00
return obj;
};
let obj3 = guildId(isNew[36]);
fn.__closure = { isNew, brandColor: token, withSequence: guildId(isNew[36]).withSequence, withTiming: guildId(isNew[37]).withTiming, Easing: guildId(isNew[36]).Easing, withDelay: guildId(isNew[36]).withDelay };
2026-07-20 16:05:17 +00:00
fn.__workletHash = 12802766002208;
fn.__initData = __initData2;
const animatedStyle = obj3.useAnimatedStyle(fn);
let obj5 = { style: null, children: null };
const items1 = [tmp.promptContainer, animatedStyle];
obj5.style = items1;
2026-07-20 16:05:17 +00:00
let isNew2 = _prompt.isNew;
if (isNew2) {
const obj9 = { color: tmp2(tmp3[20]).BadgeColors.BRAND, text: null, style: null, textStyle: null };
2026-07-29 08:29:29 +00:00
const intl = tmp2(tmp3[21]).intl;
obj9.text = intl.string(tmp2(tmp3[21]).t.y2b7CA);
({ badge: obj6.style, badgeText: obj6.textStyle } = tmp);
isNew2 = closure_16(tmp2(tmp3[20]).TextBadge, obj9);
2026-07-20 16:05:17 +00:00
}
const items2 = [isNew2, closure_16(PromptTitle, { item: _prompt }), , ];
2026-07-20 16:05:17 +00:00
const options = _prompt.options;
items2[2] = options.map((option) => {
guildId = option;
2026-08-24 06:08:38 +00:00
const obj = {
guildId,
option,
selected: stateFromStoresArray.includes(option.id),
2026-08-24 06:08:38 +00:00
onSelect(arg0) {
let flag = arg0;
let required = !arg0;
if (!arg0) {
required = _prompt.required;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
if (required) {
required = 1 === stateFromStoresArray.length;
2026-08-24 06:08:38 +00:00
}
if (!required) {
if (flag == null) {
flag = false;
}
handleSelectOption(_prompt, closure_0, flag);
2026-08-24 06:08:38 +00:00
}
},
suppressMemberCount: true,
canBeNew: !_prompt.isNew
2026-07-20 16:05:17 +00:00
};
return closure_1_16(_prompt(isNew[44]), obj, option.id);
2026-07-20 16:05:17 +00:00
});
items2[3] = closure_16(PromptHelpText, { guildId, prompt: _prompt, selectedOptionIds: stateFromStoresArray });
obj5.children = items2;
return closure_17(_prompt(isNew[36]).View, obj5);
2026-07-20 16:05:17 +00:00
}
get_ActivityIndicator = fn(17);
({ View: closure_4, Image: hasOwnProperty, ScrollView: metroRequire } = get_ActivityIndicator);
const GuildOnboardingPromptsConstants = fn(7204);
({ GuildOnboardingTab: closure_12, OnboardingPromptType: map1 } = GuildOnboardingPromptsConstants);
const EMOJI_URL_BASE_SIZE = fn(1374).EMOJI_URL_BASE_SIZE;
const ReadStateTypes = fn(4818).ReadStateTypes;
const jsxProd = fn(21);
2026-07-23 10:11:24 +00:00
({ jsx: closure_16, jsxs: closure_17, Fragment: closure_18 } = jsxProd);
const createStyles = fn(4636);
let obj2 = { container: { paddingHorizontal: nativeDefault.space.PX_16 }, sheetTitle: null, promptContainer: null, titleContainer: null, badge: null, badgeText: null, dropdownContainer: null, emptyDropdownText: null, dropdownPill: null, emojiContainer: null, dropdownIconContainer: null, dropdownIcon: null, optionTextEmoji: null, optionImageEmoji: null, helpText: null, sectionSeparator: null, emptyContainer: null, emptyContainerImage: null, emptyContainerHeader: null, connectionsContainer: null, connectionsPromptContainer: null, connectionsTitle: null };
let obj3 = { paddingHorizontal: nativeDefault.space.PX_16 };
obj2.sheetTitle = { marginTop: nativeDefault.space.PX_16 };
let obj4 = { marginTop: nativeDefault.space.PX_16 };
obj2.promptContainer = { position: "relative", backgroundColor: nativeDefault.colors.BACKGROUND_SURFACE_HIGH, marginTop: nativeDefault.space.PX_12, padding: nativeDefault.space.PX_12, borderRadius: nativeDefault.radii.md, borderWidth: 2, borderStyle: "solid" };
let obj5 = { position: "relative", backgroundColor: nativeDefault.colors.BACKGROUND_SURFACE_HIGH, marginTop: nativeDefault.space.PX_12, padding: nativeDefault.space.PX_12, borderRadius: nativeDefault.radii.md, borderWidth: 2, borderStyle: "solid" };
obj2.titleContainer = { flexDirection: "row", alignItems: "center", marginBottom: nativeDefault.space.PX_12 };
obj2.badge = { position: "absolute", top: -6, right: -6 };
obj2.badgeText = { fontWeight: "bold" };
let obj6 = { flexDirection: "row", alignItems: "center", marginBottom: nativeDefault.space.PX_12 };
obj2.dropdownContainer = { borderRadius: nativeDefault.radii.lg, backgroundColor: nativeDefault.colors.BACKGROUND_BASE_LOWEST, padding: nativeDefault.space.PX_8, paddingRight: nativeDefault.space.PX_32, minHeight: 48, marginBottom: nativeDefault.space.PX_12, display: "flex", flexDirection: "row", flexWrap: "wrap", alignItems: "center", position: "relative" };
let obj7 = { borderRadius: nativeDefault.radii.lg, backgroundColor: nativeDefault.colors.BACKGROUND_BASE_LOWEST, padding: nativeDefault.space.PX_8, paddingRight: nativeDefault.space.PX_32, minHeight: 48, marginBottom: nativeDefault.space.PX_12, display: "flex", flexDirection: "row", flexWrap: "wrap", alignItems: "center", position: "relative" };
obj2.emptyDropdownText = { marginVertical: nativeDefault.space.PX_12, marginLeft: nativeDefault.space.PX_4 };
let obj8 = { marginVertical: nativeDefault.space.PX_12, marginLeft: nativeDefault.space.PX_4 };
obj2.dropdownPill = { borderRadius: nativeDefault.radii.sm, backgroundColor: nativeDefault.colors.BACKGROUND_BASE_LOW, padding: 6, marginRight: nativeDefault.space.PX_8, marginTop: nativeDefault.space.PX_8, display: "flex", flexDirection: "row", alignItems: "center" };
obj2.emojiContainer = { display: "flex", alignItems: "center" };
const rect = { position: "absolute", right: nativeDefault.space.PX_4, top: nativeDefault.space.PX_12 };
obj2.dropdownIconContainer = rect;
obj2.dropdownIcon = { height: 32, width: 32 };
obj2.optionTextEmoji = { fontSize: 18, lineHeight: 22, marginRight: 6 };
obj2.optionImageEmoji = { height: 22, width: 22, marginRight: 6 };
let obj9 = { borderRadius: nativeDefault.radii.sm, backgroundColor: nativeDefault.colors.BACKGROUND_BASE_LOW, padding: 6, marginRight: nativeDefault.space.PX_8, marginTop: nativeDefault.space.PX_8, display: "flex", flexDirection: "row", alignItems: "center" };
obj2.helpText = { marginTop: nativeDefault.space.PX_4 };
let obj10 = { marginTop: nativeDefault.space.PX_4 };
obj2.sectionSeparator = { marginTop: nativeDefault.space.PX_24, marginBottom: nativeDefault.space.PX_16, height: 1, backgroundColor: nativeDefault.colors.BORDER_SUBTLE };
obj2.emptyContainer = { height: 400, display: "flex", alignItems: "center", justifyContent: "center" };
let size = { width: 120, height: 80, marginBottom: nativeDefault.space.PX_16 };
obj2.emptyContainerImage = size;
let obj12 = {};
const merged = Object.assign(TextStyles(fn(1074).Fonts.DISPLAY_SEMIBOLD, nativeDefault.colors.MOBILE_TEXT_HEADING_PRIMARY, 18));
obj12.marginBottom = nativeDefault.space.PX_4;
obj2.emptyContainerHeader = obj12;
let obj11 = { marginTop: nativeDefault.space.PX_24, marginBottom: nativeDefault.space.PX_16, height: 1, backgroundColor: nativeDefault.colors.BORDER_SUBTLE };
obj2.connectionsContainer = { marginTop: nativeDefault.space.PX_12 };
let obj13 = { marginTop: nativeDefault.space.PX_12 };
obj2.connectionsPromptContainer = { marginTop: nativeDefault.space.PX_12 };
let obj14 = { marginTop: nativeDefault.space.PX_12 };
obj2.connectionsTitle = { marginBottom: nativeDefault.space.PX_4 };
let closure_19 = createStyles.createStyles(obj2);
const __initData = { code: "function CustomizeCommunityTsx1(){const{isNew,brandColor,withSequence,withTiming,Easing,withDelay}=this.__closure;const rawBorderColor=isNew?brandColor+\"FF\":brandColor+\"00\";const borderColor=withSequence(withTiming(rawBorderColor,{duration:1,easing:Easing.in(Easing.ease)}),withDelay(500,withTiming(brandColor+\"00\",{duration:300,easing:Easing.out(Easing.ease)})));return{borderColor:borderColor};}" };
const __initData2 = { code: "function CustomizeCommunityTsx2(){const{isNew,brandColor,withSequence,withTiming,Easing,withDelay}=this.__closure;const rawBorderColor=isNew?brandColor+\"FF\":brandColor+\"00\";const borderColor=withSequence(withTiming(rawBorderColor,{duration:1,easing:Easing.in(Easing.ease)}),withDelay(500,withTiming(brandColor+\"00\",{duration:300,easing:Easing.out(Easing.ease)})));return{borderColor:borderColor};}" };
size = fn(2);
let result = size.fileFinishedImporting("modules/guild_onboarding/native/CustomizeCommunity.tsx");
2026-07-20 16:05:17 +00:00
export default function CustomizeCommunity(guildId) {
guildId = guildId.guildId;
2026-07-29 08:29:29 +00:00
let stateFromStores;
const tmp = closure_19();
const bottom = stateFromStores(1611)().bottom;
const items = [ReadStateStore];
stateFromStores = guildId(504).useStateFromStores(items, () => ReadStateStore.hasUnread(guildId, ReadStateTypes.GUILD_ONBOARDING_QUESTION));
let obj = guildId(504);
const items1 = [GuildStore];
const stateFromStores1 = guildId(504).useStateFromStores(items1, () => {
const guild = GuildStore.getGuild(guildId);
2026-07-20 16:05:17 +00:00
let prop;
2026-07-29 08:29:29 +00:00
if (guild != null) {
2026-07-20 16:05:17 +00:00
prop = guild.latestOnboardingQuestionId;
}
return prop;
});
const tmp7 = stateFromStores(11682)(guildId);
2026-07-29 08:29:29 +00:00
({ newOnboardingPrompts, onboardingPromptsWithNewAnswers, onboardingPrompts } = tmp7);
2026-07-20 16:05:17 +00:00
const items2 = [guildId, stateFromStores, stateFromStores1];
2026-07-29 08:29:29 +00:00
({ onboardingPromptsRaw, newAnswersCount } = tmp7);
const effect = noop.useEffect(() => {
2026-07-29 08:29:29 +00:00
let tmp2 = null != guildId;
if (tmp2) {
tmp2 = GuildOnboardingPromptsStore.shouldFetchPrompts(tmp) || stateFromStores;
const tmp4 = GuildOnboardingPromptsStore.shouldFetchPrompts(tmp) || stateFromStores;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp2) {
const onboardingPrompts = GuildOnboardingPromptsActionCreators.fetchOnboardingPrompts(tmp);
2026-07-20 16:05:17 +00:00
}
}, items2);
const items3 = [guildId];
const effect1 = noop.useEffect(() => null != guildId ? (() => {
guildId(7213).ackGuildFeature(closure_1_0, constants.GUILD_ONBOARDING_QUESTION, GuildOnboardingPromptsStore.ackIdForGuild(closure_1_0));
const obj = guildId(7213);
const result = stateFromStores(7208).updateOnboardingResponses(closure_1_0);
2026-07-23 10:11:24 +00:00
}) : undefined, items3);
2026-07-20 16:05:17 +00:00
const items4 = [guildId];
const callback = noop.useCallback((type) => {
2026-07-20 16:05:17 +00:00
type = type.type;
if (constants2.MULTIPLE_CHOICE === type) {
const obj2 = { guildId, prompt: type };
return value2(MultipleChoicePrompt, obj2, type.id);
2026-07-29 08:29:29 +00:00
} else if (tmp.DROPDOWN === type) {
const obj = { guildId, prompt: type };
return value2(DropdownPrompt, obj, type.id);
2026-07-20 16:05:17 +00:00
}
}, items4);
if (0 === onboardingPromptsRaw.length) {
const obj3 = { style: tmp.container, contentContainerStyle: null, children: null };
const obj4 = { paddingBottom: bottom + tmp2(576).space.PX_16 };
obj3.contentContainerStyle = obj4;
const obj5 = { setTab: guildId.setTab };
obj3.children = closure_16(EmptyCustomizeCommunity, obj5);
let tmp24Result4 = closure_16(closure_6, obj3);
2026-07-20 16:05:17 +00:00
} else {
const obj6 = { style: tmp.container, contentContainerStyle: null, children: null };
const obj7 = { paddingBottom: bottom + tmp2(576).space.PX_16 };
obj6.contentContainerStyle = obj7;
2026-07-29 08:29:29 +00:00
let tmp24Result = newOnboardingPrompts.length > 0 || onboardingPromptsWithNewAnswers.length > 0;
if (tmp24Result) {
const obj8 = { children: null };
const obj9 = { style: tmp.sheetTitle, variant: "text-md/medium", color: "mobile-text-heading-primary", children: null };
const intl = tmp4(1114).intl;
const obj10 = { count: newOnboardingPrompts.length + newAnswersCount };
obj9.children = intl.format(tmp4(1114).t.iB5Gqe, obj10);
const items5 = [closure_16(tmp4(4632).Text, obj9), newOnboardingPrompts.map(callback), onboardingPromptsWithNewAnswers.map(callback), ];
const obj11 = { style: tmp.sectionSeparator };
items5[3] = closure_16(closure_4, obj11);
obj8.children = items5;
tmp24Result = tmp24(closure_18, obj8);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const items6 = [tmp24Result, , ];
let tmp24Result3 = onboardingPrompts.length > 0;
if (tmp24Result3) {
const obj12 = { children: null };
const obj13 = { style: tmp.sheetTitle, variant: "text-md/medium", color: "mobile-text-heading-primary", children: null };
const intl2 = tmp4(1114).intl;
obj13.children = intl2.string(tmp4(1114).t.BGkaer);
const items7 = [closure_16(tmp4(4632).Text, obj13), , ];
const obj14 = { variant: "text-xs/medium", color: "text-muted", children: null };
const intl3 = tmp4(1114).intl;
obj14.children = intl3.string(tmp4(1114).t.r6Vm8T);
items7[1] = closure_16(tmp4(4632).Text, obj14);
2026-07-20 16:05:17 +00:00
items7[2] = onboardingPrompts.map(callback);
obj12.children = items7;
tmp24Result3 = tmp24(closure_18, obj12);
2026-07-20 16:05:17 +00:00
}
items6[1] = tmp24Result3;
const obj15 = { guildId };
items6[2] = closure_16(ConnectionsPrompt, obj15);
obj6.children = items6;
tmp24Result4 = tmp24(closure_6, obj6);
2026-07-20 16:05:17 +00:00
}
return tmp24Result4;
2026-07-20 16:05:17 +00:00
};