decord/source/modules/lurker_mode/native/LurkerServerPreviewJoinButton.tsx
github-actions a36fe4ec9c chore: update source for alpha 347.0
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-14 20:04:03 +00:00

121 lines
4 KiB
TypeScript

// Module ID: 16252
// Function ID: 16253
// Name: LurkerServerPreviewJoinButton
// Dependencies: [5, 32, 19, 1957, 4276, 1074, 21, 9960, 1185, 5601, 5056, 1114, 2]
// Module 16252 (LurkerServerPreviewJoinButton)
import asyncGeneratorStep from "asyncGeneratorStep" /* 5 */;
import _slicedToArray from "module_32" /* 32 */;
import noop from "module_19" /* 19 */;
import ChannelStore from "ChannelStore" /* 1957 */;
import LurkingStore from "LurkingStore" /* 4276 */;
const require = fn;
const JoinGuildSources = fn(1074).JoinGuildSources;
const jsx = fn(21).jsx;
const size = fn(2);
let result = size.fileFinishedImporting("modules/lurker_mode/native/LurkerServerPreviewJoinButton.tsx");
export default noop.memo(function LurkerServerPreviewJoinButton(guildId) {
guildId = guildId.guildId;
const joinSource = guildId.joinSource;
loading = undefined;
asyncGeneratorStep = undefined;
[loading, asyncGeneratorStep] = noop.useState(false);
const items = [guildId, joinSource, loading];
const callback = noop.useCallback(asyncGeneratorStep(async (arg0, value) => {
if (c4 === 2) {
c4 = 3;
throw new TypeError("Generator functions may not be called on executing generators");
} else if (tmp6 === 3) {
if (arg0 === 1) {
throw value;
} else if (arg0 === 2) {
const obj3 = { value, done: true };
return obj3;
} else {
return { value: "HermesInternal", done: null };
}
} else {
try {
c4 = 2;
if (0 === v3) {
if (arg0 === 1) {
c4 = 3;
throw value;
} else if (arg0 === 2) {
c4 = 3;
const obj4 = { value, done: true };
return obj4;
} else if (first) {
c4 = 3;
} else {
lurkingSourceForGuild = lurkingSourceForGuild.getLurkingSourceForGuild(guildId);
let type;
if (lurkingSourceForGuild != null) {
type = lurkingSourceForGuild.type;
}
if (type === constants.DIRECTORY_ENTRY) {
channel = channel.getChannel(lurkingSourceForGuild.directoryChannelId);
if (null != channel) {
guildId = channel.getGuildId();
const result = tmp3(tmp43[7]).setHubProgressActionComplete(guildId, tmp3(tmp43[8]).HubProgressStep.JOIN_GUILD);
const obj6 = tmp3(tmp43[7]);
}
}
v0(true);
c3 = 1;
const obj5 = { source: joinSource };
v3 = 2;
c4 = 1;
const obj8 = { value: v3(tmp43[9]).joinGuild(guildId, obj5), done: false };
return obj8;
}
} else if (1 === tmp7) {
c3 = 0;
closure_128_3(false);
throw tmp43;
} else if (2 === tmp7) {
if (arg0 === 1) {
c4 = 3;
throw value;
} else if (arg0 === 2) {
c3 = 0;
closure_128_3(false);
c4 = 3;
const obj9 = { value, done: true };
return obj9;
} else {
v3 = 3;
c4 = 1;
const obj10 = { value: v3(tmp43[9]).waitForGuild(closure_128_0), done: false };
return obj10;
}
} else if (arg0 === 1) {
c4 = 3;
throw value;
} else if (arg0 !== 2) {
c3 = 0;
closure_128_3(false);
}
c3 = 0;
closure_128_3(false);
c4 = 3;
const obj = { value, done: true };
return obj;
} catch (tmp43) {
if (tmp4 === c3) {
c4 = tmp2;
throw tmp43;
} else {
v3 = tmp;
}
}
}
}), items);
let obj = { grow: true, variant: "primary", size: "md", loading, text: null, onPress: null };
const intl = guildId(loading[11]).intl;
obj.text = intl.string(guildId(loading[11]).t.RLch70);
obj.onPress = callback;
return jsx(guildId(loading[10]).Button, { grow: true, variant: "primary", size: "md", loading, text: null, onPress: null });
});