decord/source/modules/lurker_mode/native/LurkerServerPreviewJoinButton.tsx

69 lines
3.1 KiB
TypeScript
Raw Normal View History

2026-07-27 11:26:19 +00:00
// Module ID: 11465
// Function ID: 89256
// Dependencies: [31, 1348, 1850, 3760, 653, 33, 566, 10034, 1282, 6635, 11466, 5049, 4544, 1212, 1392, 3970, 2]
2026-07-20 16:05:17 +00:00
2026-07-27 11:26:19 +00:00
// Module 11465
2026-07-23 10:11:24 +00:00
import importAllResult from "result";
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import closure_5 from "_isNativeReflectConstruct";
import closure_6 from "_isNativeReflectConstruct";
import { JoinGuildSources } from "ME";
import { jsx } from "jsxProd";
const require = arg1;
2026-07-20 16:05:17 +00:00
const memoResult = importAllResult.memo(function LurkerServerPreviewJoinButton(guildId) {
guildId = guildId.guildId;
const joinSource = guildId.joinSource;
const onBeforeJoin = guildId.onBeforeJoin;
2026-07-23 10:11:24 +00:00
let obj = guildId(onBeforeJoin[6]);
2026-07-20 16:05:17 +00:00
const items = [closure_5];
2026-07-23 10:11:24 +00:00
const stateFromStores = obj.useStateFromStores(items, () => outer1_5.getCurrentUser());
2026-07-20 16:05:17 +00:00
const items1 = [guildId, joinSource, onBeforeJoin];
const callback = stateFromStores.useCallback(() => {
2026-07-23 10:11:24 +00:00
const lurkingSourceForGuild = outer1_6.getLurkingSourceForGuild(guildId);
2026-07-20 16:05:17 +00:00
let type;
if (null != lurkingSourceForGuild) {
type = lurkingSourceForGuild.type;
}
2026-07-23 10:11:24 +00:00
if (type === outer1_7.DIRECTORY_ENTRY) {
const channel = outer1_4.getChannel(lurkingSourceForGuild.directoryChannelId);
2026-07-20 16:05:17 +00:00
if (null != channel) {
2026-07-23 10:11:24 +00:00
guildId = channel.getGuildId();
2026-07-20 16:05:17 +00:00
const result = guildId(onBeforeJoin[7]).setHubProgressActionComplete(guildId, guildId(onBeforeJoin[8]).HubProgressStep.JOIN_GUILD);
const obj2 = guildId(onBeforeJoin[7]);
}
}
const obj3 = guildId(onBeforeJoin[9]);
obj3.trackJoinClicked(guildId, joinSource, joinSource(onBeforeJoin[10]).hasNavigatedAway(guildId));
if (null != onBeforeJoin) {
onBeforeJoin();
}
const obj4 = joinSource(onBeforeJoin[10]);
joinSource(onBeforeJoin[11]).joinGuild(guildId, { source: joinSource });
}, items1);
if (null == stateFromStores) {
2026-07-23 10:11:24 +00:00
obj = { grow: true, variant: "primary", size: "md" };
const intl = guildId(onBeforeJoin[13]).intl;
obj.text = intl.string(guildId(onBeforeJoin[13]).t.VJlc0S);
2026-07-20 16:05:17 +00:00
obj.onPress = callback;
2026-07-23 10:11:24 +00:00
return jsx(guildId(onBeforeJoin[12]).Button, { grow: true, variant: "primary", size: "md" });
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
let obj2 = joinSource(onBeforeJoin[14]);
2026-07-20 16:05:17 +00:00
const userAvatarSource = obj2.getUserAvatarSource(stateFromStores, false);
2026-07-23 10:11:24 +00:00
const intl2 = guildId(onBeforeJoin[13]).intl;
2026-07-20 16:05:17 +00:00
obj = {
usernameHook() {
return joinSource(onBeforeJoin[15]).getFormattedName(stateFromStores);
}
};
2026-07-23 10:11:24 +00:00
const obj1 = { grow: true, variant: "primary", size: "md", text: intl2.formatToPlainString(guildId(onBeforeJoin[13]).t["5qtVhX"], obj) };
2026-07-20 16:05:17 +00:00
obj2 = { source: userAvatarSource, variant: "entity" };
2026-07-23 10:11:24 +00:00
obj1.icon = jsx(guildId(onBeforeJoin[12]).Button.Icon, { source: userAvatarSource, variant: "entity" });
2026-07-20 16:05:17 +00:00
obj1.onPress = callback;
2026-07-23 10:11:24 +00:00
return jsx(guildId(onBeforeJoin[12]).Button, { grow: true, variant: "primary", size: "md", text: intl2.formatToPlainString(guildId(onBeforeJoin[13]).t["5qtVhX"], obj) });
2026-07-20 16:05:17 +00:00
}
});
2026-07-23 10:11:24 +00:00
let result = require("_isNativeReflectConstruct").fileFinishedImporting("modules/lurker_mode/native/LurkerServerPreviewJoinButton.tsx");
2026-07-20 16:05:17 +00:00
export default memoResult;