decord/source/modules/guilds_bar/native/GuildsBarCreateJoinButton.tsx
2026-08-13 07:00:46 +00:00

179 lines
6.6 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Module ID: 15556
// Function ID: 15557
// Name: _handleCreateJoinGuildPress
// Dependencies: [5, 19, 17, 4165, 676, 1924, 21, 4342, 9986, 2007, 12125, 5874, 8410, 5788, 1367, 15499, 13039, 589, 15513, 1236, 15557, 9577, 712, 2]
// Module 15556 (_handleCreateJoinGuildPress)
import GuildFeatures from "GuildFeatures";
import importAllResult from "getSystemLocale";
import { View } from "initialize";
import handleConnectionOpen from "handleConnectionOpen";
import ME from "ME";
import { PremiumUpsellTypes } from "GuildFeatures";
import { jsx } from "CirclePlusIcon";
import createCacheKey from "createCacheKey";
let c10;
let c9;
let error;
let metroImportAll;
const require = arg1;
function _handleCreateJoinGuildPress() {
const self = this;
const tmp = callback(function*() {
if (c3 === 2) {
c3 = 3;
HermesBuiltin.throwTypeError();
} else if (tmp4 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
return { value: "HermesInternal", done: null };
}
} else {
try {
c3 = 2;
if (0 === c2) {
if (arg0 === 1) {
c3 = 3;
throw arg1;
} else if (arg0 === 2) {
c3 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
let lib2 = tmp5;
let lib = tmp2;
lib = undefined;
lib2 = undefined;
c2 = 1;
c3 = 1;
const obj1 = { value: null, done: false };
obj1[0] = outer1_0(c2[9])(c2[8], c2.paths);
return obj1;
}
} else if (1 === tmp5) {
if (arg0 === 1) {
c3 = 3;
throw arg1;
} else if (arg0 === 2) {
c3 = 3;
const obj2 = { value: null, done: true };
obj2[0] = arg1;
return obj2;
} else {
lib = arg1.default;
c2 = 2;
c3 = 1;
const obj3 = { value: null, done: false };
obj3[0] = lib(c2[9])(c2[10], c2.paths);
return obj3;
}
} else if (arg0 === 1) {
c3 = 3;
throw arg1;
} else if (arg0 === 2) {
c3 = 3;
const obj4 = { value: null, done: true };
obj4[0] = arg1;
return obj4;
} else {
lib2 = arg1.default;
lib.acknowledgeTooltip(constants2.GUILD_TOOLTIP);
if (obj11.isAtGuildCapAndNonPremium()) {
obj = lib2(c2[12]);
const obj5 = { initialUpsellKey: null, analyticsLocation: null, analyticsLocations: null, analyticsProperties: null };
obj5[0] = constants3.GUILD_CAP;
const obj6 = { page: null };
obj6[0] = constants.CREATE_JOIN_GUILD_MODAL;
obj5[1] = obj6;
const items = [lib2(c2[13]).NEW_GUILD_BUTTON];
obj5[2] = items;
const obj7 = { type: null };
obj7[0] = constants4.GUILD_CAP_MODAL_UPSELL;
obj5[3] = obj7;
const result = obj.handleShowUpsellAlert(obj5);
} else {
lib2.openCreateGuildModal();
}
c3 = 3;
obj11 = lib(c2[11]);
}
} catch (tmp27) {
c3 = tmp;
throw tmp27;
}
}
});
const _handleCreateJoinGuildPress = tmp;
const apply = tmp.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
}
let c4 = importAllResult;
({ AnalyticsPages: error, MOBILE_GUILD_UPSELL_LIST: metroImportAll, TooltipNames: c9, UpsellTypes: c10 } = ME);
let closure_13 = createCacheKey.createStyles({ stretch: { alignSelf: "stretch" } });
const memoResult = importAllResult.memo(function GuildsBarCreateJoinButton() {
const tmp3 = importDefault(1367)("GuildsBarCreateJoinButton");
let obj = enabled(15499);
const tmp4 = callback2();
const GameCommunityAddServerEntryExperiment = enabled(13039).GameCommunityAddServerEntryExperiment;
enabled = GameCommunityAddServerEntryExperiment.useConfig({ location: "GuildsBarCreateJoinButton" }).enabled;
let obj1 = enabled(589);
const items = [handleConnectionOpen];
let stateFromStores = enabled;
if (enabled) {
stateFromStores = obj1.useStateFromStores(items, () => guildId.getGuildId() === closure_8);
}
const items1 = [enabled];
obj = { style: tmp4.stretch, children: null };
const memo = importAllResult.useMemo(() => ({
onPress() {
if (closure_0) {
if (!obj.isAtGuildCapAndNonPremium()) {
outer1_1(outer1_2[18])(outer1_8);
}
}
(function handleCreateJoinGuildPress() {
const self = this;
const apply = closure_14.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
})();
}
}), items1);
obj = { selected: stateFromStores, circle: null, unread: false, styles: null, overState: "y", config: "femme", label: "femme faisant un geste d\u2019interdiction", expandedChildren: "geste", children: "interdit" };
let tmp12 = !tmp3;
const guildsBarAnimatedWrapperStyles = obj.useGuildsBarAnimatedWrapperStyles();
const tmp10 = View;
if (!tmp3) {
tmp12 = !stateFromStores;
}
obj[1] = tmp12;
obj[3] = guildsBarAnimatedWrapperStyles;
obj[5] = memo;
const intl = tmp5(1236).intl;
obj[6] = intl.string(enabled(1236).t.l5WIbf);
obj[7] = jsx(enabled(15557).HomeDrawerAddServerRowExpandedChildren, {});
const colors = tmp(712).colors;
obj1 = { size: "md", color: stateFromStores ? colors.WHITE : colors.MOBILE_GUILDBAR_ICON_DEFAULT };
obj[8] = jsx(enabled(9577).CirclePlusIcon, { size: "md", color: stateFromStores ? colors.WHITE : colors.MOBILE_GUILDBAR_ICON_DEFAULT });
obj[1] = jsx(importDefault(15499), { selected: stateFromStores, circle: null, unread: false, styles: null, overState: "y", config: "femme", label: "femme faisant un geste d\u2019interdiction", expandedChildren: "geste", children: "interdit" });
return <tmp10 selected={stateFromStores} circle={null} unread={false} styles={null} overState="y" config="femme" label="femme faisant un geste d’interdiction" expandedChildren="geste">{"interdit"}</tmp10>;
});
let result = require("get ActivityIndicator").fileFinishedImporting("modules/guilds_bar/native/GuildsBarCreateJoinButton.tsx");
export default memoResult;