Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4825.js (118.4 MB)
147 lines
5.9 KiB
TypeScript
147 lines
5.9 KiB
TypeScript
// Module ID: 16513
|
|
// Function ID: 16514
|
|
// Name: GuildsBarCreateJoinButton
|
|
// Dependencies: [5, 19, 17, 4461, 1074, 1374, 21, 4640, 9845, 1897, 12859, 7326, 9467, 7296, 16454, 13830, 504, 16469, 1115, 16514, 11358, 576, 2]
|
|
|
|
// Module 16513 (GuildsBarCreateJoinButton)
|
|
import nativeDefault from "native" /* 576 */;
|
|
import GuildsBarAnimatedItemWrapperDefault from "GuildsBarAnimatedItemWrapper" /* 16454 */;
|
|
import transitionGuildsBarToGuildOrOpenSelectedChannelDefault from "transitionGuildsBarToGuildOrOpenSelectedChannel" /* 16469 */;
|
|
import asyncGeneratorStep from "asyncGeneratorStep" /* 5 */;
|
|
import noop from "module_19" /* 19 */;
|
|
import SelectedGuildStore from "SelectedGuildStore" /* 4461 */;
|
|
|
|
const require = fn;
|
|
let closure_14 = async function _handleCreateJoinGuildPress(arg0, value) {
|
|
if (c3 === 2) {
|
|
c3 = 3;
|
|
throw new TypeError("Generator functions may not be called on executing generators");
|
|
} else if (tmp4 === 3) {
|
|
if (arg0 === 1) {
|
|
throw value;
|
|
} else if (arg0 === 2) {
|
|
const obj2 = { value, done: true };
|
|
return obj2;
|
|
} else {
|
|
return { value: "HermesInternal", done: null };
|
|
}
|
|
} else {
|
|
try {
|
|
c3 = 2;
|
|
if (0 === c2) {
|
|
if (arg0 === 1) {
|
|
c3 = 3;
|
|
throw value;
|
|
} else if (arg0 === 2) {
|
|
c3 = 3;
|
|
const obj3 = { value, done: true };
|
|
return obj3;
|
|
} else {
|
|
closure_1 = tmp5;
|
|
closure_0 = tmp2;
|
|
closure_128_0 = undefined;
|
|
closure_128_1 = undefined;
|
|
c2 = 1;
|
|
c3 = 1;
|
|
const obj4 = { value: require("asyncRequireImpl")(paths[8], paths.paths), done: false };
|
|
return obj4;
|
|
}
|
|
} else if (1 === tmp5) {
|
|
if (arg0 === 1) {
|
|
c3 = 3;
|
|
throw value;
|
|
} else if (arg0 === 2) {
|
|
c3 = 3;
|
|
const obj5 = { value, done: true };
|
|
return obj5;
|
|
} else {
|
|
closure_128_0 = value.default;
|
|
c2 = 2;
|
|
c3 = 1;
|
|
const obj6 = { value: closure_129_0(closure_129_2[9])(closure_129_2[10], closure_129_2.paths), done: false };
|
|
return obj6;
|
|
}
|
|
} else if (arg0 === 1) {
|
|
c3 = 3;
|
|
throw value;
|
|
} else if (arg0 === 2) {
|
|
c3 = 3;
|
|
const obj7 = { value, done: true };
|
|
return obj7;
|
|
} else {
|
|
closure_128_1 = value.default;
|
|
closure_128_0.acknowledgeTooltip(closure_129_9.GUILD_TOOLTIP);
|
|
if (obj11.isAtGuildCapAndNonPremium()) {
|
|
const obj8 = { initialUpsellKey: closure_129_10.GUILD_CAP, analyticsLocation: null, analyticsLocations: null, analyticsProperties: null };
|
|
const obj9 = { page: closure_129_7.CREATE_JOIN_GUILD_MODAL };
|
|
obj8.analyticsLocation = obj9;
|
|
const items = [closure_129_1(closure_129_2[13]).NEW_GUILD_BUTTON];
|
|
obj8.analyticsLocations = items;
|
|
const obj10 = { type: closure_129_11.GUILD_CAP_MODAL_UPSELL };
|
|
obj8.analyticsProperties = obj10;
|
|
const result = closure_129_1(closure_129_2[12]).handleShowUpsellAlert(obj8);
|
|
const obj = closure_129_1(closure_129_2[12]);
|
|
} else {
|
|
closure_128_1.openCreateGuildModal();
|
|
}
|
|
c3 = 3;
|
|
obj11 = closure_129_0(closure_129_2[11]);
|
|
}
|
|
} catch (tmp27) {
|
|
c3 = tmp;
|
|
throw tmp27;
|
|
}
|
|
}
|
|
};
|
|
const View = fn(17).View;
|
|
const Constants = fn(1074);
|
|
({ AnalyticsPages: closure_7, MOBILE_GUILD_UPSELL_LIST: closure_8, TooltipNames: closure_9, UpsellTypes: c10 } = Constants);
|
|
const PremiumUpsellTypes = fn(1374).PremiumUpsellTypes;
|
|
const jsx = fn(21).jsx;
|
|
const createStyles = fn(4640);
|
|
let closure_13 = createStyles.createStyles({ stretch: { alignSelf: "stretch" } });
|
|
const size = fn(2);
|
|
let result = size.fileFinishedImporting("modules/guilds_bar/native/GuildsBarCreateJoinButton.tsx");
|
|
|
|
export default noop.memo(function GuildsBarCreateJoinButton() {
|
|
const tmp = closure_13();
|
|
const obj = enabled(16454);
|
|
const GameCommunityAddServerEntryExperiment = enabled(13830).GameCommunityAddServerEntryExperiment;
|
|
enabled = GameCommunityAddServerEntryExperiment.useConfig({ location: "GuildsBarCreateJoinButton" }).enabled;
|
|
const guildsBarAnimatedWrapperStyles = enabled(16454).useGuildsBarAnimatedWrapperStyles();
|
|
const items = [SelectedGuildStore];
|
|
let stateFromStores = enabled;
|
|
if (enabled) {
|
|
stateFromStores = obj2.useStateFromStores(items, () => guildId.getGuildId() === closure_1_8);
|
|
}
|
|
const items1 = [enabled];
|
|
const obj3 = { style: tmp.stretch, children: null };
|
|
const memo = noop.useMemo(() => ({
|
|
onPress() {
|
|
if (enabled) {
|
|
if (!obj.isAtGuildCapAndNonPremium()) {
|
|
transitionGuildsBarToGuildOrOpenSelectedChannelDefault(closure_2_8);
|
|
}
|
|
}
|
|
(function handleCreateJoinGuildPress() {
|
|
const self = this;
|
|
const apply = closure_1_14.apply;
|
|
if (typeof apply === "unknown") {
|
|
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
|
|
} else {
|
|
applyArgumentsResult = apply(self, arguments);
|
|
}
|
|
return applyArgumentsResult;
|
|
})();
|
|
}
|
|
}), items1);
|
|
const obj4 = { selected: stateFromStores, circle: false, unread: false, styles: guildsBarAnimatedWrapperStyles, overState: "y", config: memo, label: "ondskab", expandedChildren: "ondt", children: "sort" };
|
|
obj2 = enabled(504);
|
|
const intl = tmp2(1115).intl;
|
|
obj4.label = intl.string(enabled(1115).t.l5WIbf);
|
|
obj4.expandedChildren = jsx(enabled(16514).HomeDrawerAddServerRowExpandedChildren, {});
|
|
const colors = nativeDefault.colors;
|
|
obj4.children = jsx(enabled(11358).CirclePlusIcon, { size: "md", color: stateFromStores ? colors.WHITE : colors.MOBILE_GUILDBAR_ICON_DEFAULT });
|
|
obj3.children = jsx(GuildsBarAnimatedItemWrapperDefault, { selected: stateFromStores, circle: false, unread: false, styles: guildsBarAnimatedWrapperStyles, overState: "y", config: memo, label: "ondskab", expandedChildren: "ondt", children: "sort" });
|
|
return <tmp8 style={tmp.stretch}>{null}</tmp8>;
|
|
});
|