decord/source/modules/user_profile/native/UserProfileActivityButtons.tsx

515 lines
20 KiB
TypeScript
Raw Normal View History

// Module ID: 13032
// Function ID: 13033
2026-07-20 16:05:17 +00:00
// Name: JoinActivityButton
// Dependencies: [5, 19, 1956, 1957, 5281, 4480, 1979, 11457, 4199, 4209, 2011, 5279, 4579, 1074, 8340, 21, 4560, 576, 7162, 4189, 563, 13033, 13034, 7739, 4975, 1114, 5106, 9533, 4527, 11765, 10891, 1178, 8142, 11748, 4255, 13036, 8259, 4763, 4418, 8393, 4767, 5283, 1396, 9252, 7382, 8344, 11752, 1365, 8370, 2]
2026-07-20 16:05:17 +00:00
// Exports: ConnectPlatformButton, CustomActivityButton, JoinActivityButton, JoinGameActivityButton, PlayOnSpotifyButton, VoiceChannelButtons, WatchActivityButton
// Module 13032 (JoinActivityButton)
2026-08-24 06:08:38 +00:00
import noopAll from "noop" /* 19 */;
import defaultAreStatesEqual from "defaultAreStatesEqual" /* 563 */;
import ThemesDefault from "Themes" /* 576 */;
import getSystemLocale from "getSystemLocale" /* 1114 */;
import Button from "Button" /* 1178 */;
import Button2 from "Button" /* 4975 */;
import contextDefault from "context" /* 7162 */;
import _isStreamingDefault from "_isStreaming" /* 8259 */;
import getStreamURLDefault from "getStreamURL" /* 13036 */;
2026-08-24 06:08:38 +00:00
import closure_3 from "asyncGeneratorStep" /* 5 */;
import closure_4 from "participantFromServer" /* 1956 */;
import closure_5 from "ensureGuildLoaded" /* 1957 */;
import closure_6 from "set" /* 5281 */;
import closure_7 from "handleInviteData" /* 4480 */;
import closure_8 from "createGuildRecordFromRust" /* 1979 */;
import closure_9 from "updateActivities" /* 11457 */;
import closure_10 from "getUncachedChannelPermissions" /* 4199 */;
import closure_11 from "markAllUserIdListsStale" /* 4209 */;
import closure_12 from "handleConnectionOpen" /* 2011 */;
import closure_13 from "filterPlayingActivities" /* 5279 */;
import closure_14 from "updateVoiceState" /* 4579 */;
import ME from "ME" /* 1074 */;
import SPOTIFY_APP_PROTOCOL from "SPOTIFY_APP_PROTOCOL" /* 8340 */;
2026-08-24 06:08:38 +00:00
import { jsx } from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4560 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
noopAll;
2026-07-23 10:11:24 +00:00
({ PlatformTypes: closure_15, UserSettingsSections: closure_16 } = ME);
2026-08-24 06:08:38 +00:00
({ SpotifyEndpoints: closure_17, SpotifyResourceTypes: closure_18 } = SPOTIFY_APP_PROTOCOL);
2026-07-29 08:29:29 +00:00
createCacheKey = { icon: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { tintColor: ThemesDefault.colors.CONTROL_SECONDARY_TEXT_DEFAULT };
2026-07-29 08:29:29 +00:00
createCacheKey[0] = createCacheKey;
2026-08-24 06:08:38 +00:00
let closure_20 = createCacheKey.createStyles(createCacheKey);
const result = require("set").fileFinishedImporting("modules/user_profile/native/UserProfileActivityButtons.tsx");
2026-07-20 16:05:17 +00:00
export const JoinActivityButton = function JoinActivityButton(user) {
user = user.user;
2026-07-23 10:11:24 +00:00
({ currentUser: importDefault, activity } = user);
2026-07-20 16:05:17 +00:00
const application = user.application;
2026-07-23 10:11:24 +00:00
const onAction = user.onAction;
2026-07-29 08:29:29 +00:00
let analyticsLocations;
2026-07-20 16:05:17 +00:00
let embeddedActivityLocationChannelId;
2026-08-24 06:08:38 +00:00
closure_7 = undefined;
2026-07-29 08:29:29 +00:00
let JOINED = activity;
analyticsLocations = importDefault(activity[18])().analyticsLocations;
2026-07-20 16:05:17 +00:00
let id;
2026-07-29 08:29:29 +00:00
if (application != null) {
2026-07-20 16:05:17 +00:00
id = application.id;
}
2026-07-23 10:11:24 +00:00
const embeddedActivityForUserId = onAction.getEmbeddedActivityForUserId(user.id, id);
2026-07-29 08:29:29 +00:00
let obj = user(JOINED[19]);
2026-07-20 16:05:17 +00:00
let _location;
2026-07-29 08:29:29 +00:00
if (embeddedActivityForUserId != null) {
2026-07-20 16:05:17 +00:00
_location = embeddedActivityForUserId.location;
}
embeddedActivityLocationChannelId = obj.getEmbeddedActivityLocationChannelId(_location);
2026-07-29 08:29:29 +00:00
let tmp5Result = tmp5(JOINED[20]);
2026-08-24 06:08:38 +00:00
closure_7 = tmp5Result.useStateFromStores([], () => closure_1_1(activity[21])({ channelId: closure_6, userId: user.id, activity }));
2026-07-29 08:29:29 +00:00
tmp5Result = tmp5(JOINED[20]);
2026-08-24 06:08:38 +00:00
const items = [analyticsLocations, closure_8, closure_7, closure_11, closure_12, closure_14, closure_10, closure_9, closure_13, onAction];
const stateFromStores = tmp5Result.useStateFromStores(items, () => closure_1_1(activity[22])({ isEmbedded: true, user, currentUser: closure_1, activity, application, channelId: closure_7, ChannelStore: analyticsLocations, GuildStore: closure_1_8, GuildMemberCountStore: closure_7, RelationshipStore: closure_1_11, SelectedChannelStore: closure_1_12, VoiceStateStore: closure_1_14, PermissionStore: closure_1_10, LocalActivityStore: closure_1_9, SelfPresenceStore: closure_1_13, EmbeddedActivitiesStore: onAction }));
2026-07-29 08:29:29 +00:00
let tmp8 = null;
if (importDefault(JOINED[23])(activity)) {
tmp8 = null;
2026-07-20 16:05:17 +00:00
if (null != application) {
2026-07-29 08:29:29 +00:00
tmp8 = null;
if (stateFromStores !== tmp5(JOINED[22]).ActivityJoinability.CANNOT_JOIN) {
if (stateFromStores === tmp5(JOINED[22]).ActivityJoinability.JOINED) {
const intl2 = tmp5(JOINED[25]).intl;
let stringResult = intl2.string(tmp5(JOINED[25]).t.DPfdsq);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const intl = tmp5(JOINED[25]).intl;
stringResult = intl.string(tmp5(JOINED[25]).t["4i2vj+"]);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { text: null, icon: null, variant: "active", disabled: null, onPress: null };
obj[0] = stringResult;
obj[1] = jsx(tmp5(JOINED[26]).AppsIcon, { size: "sm", color: "white" });
JOINED = tmp5(JOINED[22]).ActivityJoinability.JOINED;
obj[3] = stateFromStores === JOINED;
obj[4] = function onPress() {
2026-07-20 16:05:17 +00:00
onAction({ action: "PRESS_JOIN_BUTTON" });
2026-08-24 06:08:38 +00:00
closure_1_1(activity[27])({ applicationId: application.id, activityChannelId: closure_7, locationObject: {}, analyticsLocations });
2026-08-26 06:04:24 +00:00
closure_1_1(activity[28]).hideAllActionSheets();
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
jsx(tmp5(JOINED[24]).Button, { text: null, icon: null, variant: "active", disabled: null, onPress: null });
2026-07-20 16:05:17 +00:00
}
}
}
2026-07-29 08:29:29 +00:00
return tmp8;
2026-07-20 16:05:17 +00:00
};
export const JoinGameActivityButton = function JoinGameActivityButton(onAction) {
2026-07-23 10:11:24 +00:00
({ user: require, currentUser: importDefault, activity: dependencyMap, application } = onAction);
2026-07-20 16:05:17 +00:00
onAction = onAction.onAction;
2026-07-29 08:29:29 +00:00
let analyticsLocations;
2026-08-24 06:08:38 +00:00
closure_6 = undefined;
2026-07-29 08:29:29 +00:00
let JOINED = dependencyMap;
2026-08-24 06:08:38 +00:00
analyticsLocations = contextDefault().analyticsLocations;
closure_6 = { id: application.id, deeplink_uri: application.deepLinkUri };
let obj = defaultAreStatesEqual;
const items = [analyticsLocations, closure_8, closure_7, closure_11, closure_12, closure_14, closure_10, closure_9, closure_13, onAction];
const stateFromStores = obj.useStateFromStores(items, () => closure_1_1(closure_1_2[22])({ user: closure_0, currentUser: closure_1, activity: closure_2, application, channelId: null, isEmbedded: false, ChannelStore: analyticsLocations, GuildStore: closure_1_8, GuildMemberCountStore: closure_1_7, RelationshipStore: closure_1_11, SelectedChannelStore: closure_1_12, VoiceStateStore: closure_1_14, PermissionStore: closure_1_10, LocalActivityStore: closure_1_9, SelfPresenceStore: closure_1_13, EmbeddedActivitiesStore: onAction }));
2026-07-29 08:29:29 +00:00
let tmp3 = null;
2026-07-20 16:05:17 +00:00
if (null != application) {
2026-07-29 08:29:29 +00:00
tmp3 = null;
if (stateFromStores !== tmp(13034).ActivityJoinability.CANNOT_JOIN) {
if (stateFromStores === tmp(13034).ActivityJoinability.JOINED) {
const intl2 = tmp(1114).intl;
let stringResult = intl2.string(tmp(1114).t.DPfdsq);
2026-07-20 16:05:17 +00:00
} else {
const intl = tmp(1114).intl;
stringResult = intl.string(tmp(1114).t.VJlc0S);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { text: null, variant: "active", disabled: null, onPress: null };
obj[0] = stringResult;
JOINED = tmp(13034).ActivityJoinability.JOINED;
2026-07-29 08:29:29 +00:00
obj[2] = stateFromStores === JOINED;
obj[3] = function onPress() {
2026-07-20 16:05:17 +00:00
onAction({ action: "PRESS_JOIN_BUTTON" });
2026-08-24 06:08:38 +00:00
let obj = closure_1_1(closure_1_2[29]);
obj = { userId: id.id, sessionId: session_id.session_id, application: closure_6, channelId: null, messageId: null, applicationActivity: session_id, source: "UserProfile", analyticsLocations };
2026-07-20 16:05:17 +00:00
const joined = obj.join(obj);
2026-08-26 06:04:24 +00:00
closure_1_1(closure_1_2[28]).hideAllActionSheets();
2026-07-20 16:05:17 +00:00
};
jsx(tmp(4975).Button, { text: null, variant: "active", disabled: null, onPress: null });
2026-07-29 08:29:29 +00:00
const tmp6 = jsx;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
return tmp3;
2026-07-20 16:05:17 +00:00
};
export const PlayOnSpotifyButton = function PlayOnSpotifyButton(arg0) {
2026-07-23 10:11:24 +00:00
({ activity, onAction: require } = arg0);
2026-07-29 08:29:29 +00:00
let sync_id;
sync_id = activity.sync_id;
let tmp4 = null;
if (sync_id(10891)(activity)) {
2026-07-29 08:29:29 +00:00
tmp4 = null;
2026-07-20 16:05:17 +00:00
if (null != sync_id) {
2026-07-29 08:29:29 +00:00
let obj = { text: null, icon: null, variant: "secondary", onPress: null };
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
2026-07-29 08:29:29 +00:00
obj = { platform: null };
obj[0] = activity.name;
2026-08-24 06:08:38 +00:00
obj[0] = intl.formatToPlainString(getSystemLocale.t.LEgD7t, obj);
2026-07-29 08:29:29 +00:00
obj = { size: null, source: null, disableColor: true, style: null };
2026-08-24 06:08:38 +00:00
obj[0] = Button.Icon.Sizes.SMALL;
obj[1] = sync_id(8142);
2026-07-29 08:29:29 +00:00
obj[3] = tmp.icon;
2026-08-24 06:08:38 +00:00
obj[1] = jsx(Button.Icon, { size: null, source: null, disableColor: true, style: null });
2026-07-29 08:29:29 +00:00
obj[3] = callback(function*() {
if (c5 === 2) {
c5 = 3;
HermesBuiltin.throwTypeError();
} else if (tmp6 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} else {
try {
c5 = 2;
if (0 === c4) {
if (arg0 === 1) {
c5 = 3;
throw arg1;
} else if (arg0 === 2) {
c5 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-24 06:08:38 +00:00
closure_1 = tmp3;
closure_0 = tmp7;
2026-07-29 08:29:29 +00:00
closure_0 = undefined;
2026-08-24 06:08:38 +00:00
closure_1_0({ action: "PRESS_PLAY_ON_SPOTIFY_BUTTON" });
c3 = 1;
let obj2 = closure_1_0(closure_1_2[33]);
2026-07-29 08:29:29 +00:00
c4 = 2;
c5 = 1;
2026-08-24 06:08:38 +00:00
obj1 = { value: null, done: false };
2026-07-29 08:29:29 +00:00
obj1[0] = obj2.canOpenSpotifyUrl();
return obj1;
}
} else if (1 === tmp7) {
c3 = 0;
c5 = 3;
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
} else if (arg0 === 1) {
c5 = 3;
throw arg1;
} else if (arg0 === 2) {
c3 = 0;
c5 = 3;
obj2 = { value: null, done: true };
obj2[0] = arg1;
return obj2;
} else {
closure_0 = arg1;
2026-08-24 06:08:38 +00:00
const obj7 = closure_1_0(closure_1_2[33]);
2026-07-29 08:29:29 +00:00
if (closure_0) {
2026-08-24 06:08:38 +00:00
obj7.openUrl(closure_0, closure_1_18.TRACK, closure_1);
2026-07-29 08:29:29 +00:00
} else {
obj7.attributeInstall();
2026-08-24 06:08:38 +00:00
obj = closure_1_1(closure_1_2[34]);
obj.openURL(closure_1_17.APP_STORE);
2026-07-29 08:29:29 +00:00
}
c3 = 0;
c5 = 3;
}
} catch (tmp22) {
2026-08-24 06:08:38 +00:00
closure_2 = tmp22;
2026-07-29 08:29:29 +00:00
if (tmp4 === c3) {
c5 = tmp2;
throw tmp22;
} else {
c4 = tmp;
}
}
}
});
2026-08-24 06:08:38 +00:00
tmp4 = jsx(Button2.Button, { size: null, source: null, disableColor: true, style: null });
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
};
export const WatchActivityButton = function WatchActivityButton(arg0) {
2026-07-23 10:11:24 +00:00
({ activity, onAction: require } = arg0);
2026-08-24 06:08:38 +00:00
importDefault = undefined;
const tmp2 = getStreamURLDefault(activity);
2026-07-29 08:29:29 +00:00
importDefault = tmp2;
let tmp3 = null;
2026-08-24 06:08:38 +00:00
if (_isStreamingDefault(activity)) {
2026-07-29 08:29:29 +00:00
tmp3 = null;
if (null != tmp2) {
const obj = { text: null, variant: "secondary", onPress: null };
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
obj[0] = intl.string(getSystemLocale.t.I6JG46);
2026-07-29 08:29:29 +00:00
obj[2] = function onPress() {
callback({ action: "PRESS_WATCH_BUTTON" });
2026-08-24 06:08:38 +00:00
callback2(closure_1_2[34]).openURL(callback2);
2026-07-20 16:05:17 +00:00
};
2026-08-24 06:08:38 +00:00
tmp3 = jsx(Button2.Button, { text: null, variant: "secondary", onPress: null });
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
return tmp3;
2026-07-20 16:05:17 +00:00
};
export const VoiceChannelButtons = function VoiceChannelButtons(channel) {
channel = channel.channel;
2026-07-23 10:11:24 +00:00
({ isInChannel, onAction: importDefault } = channel);
2026-07-29 08:29:29 +00:00
let newestAnalyticsLocation;
2026-08-24 06:08:38 +00:00
c3 = undefined;
2026-07-23 10:11:24 +00:00
newestAnalyticsLocation = importDefault(newestAnalyticsLocation[18])().newestAnalyticsLocation;
2026-07-20 16:05:17 +00:00
const isGuildStageVoiceResult = channel.isGuildStageVoice();
2026-07-29 08:29:29 +00:00
c3 = isGuildStageVoiceResult;
2026-07-20 16:05:17 +00:00
const isDMResult = channel.isDM();
if (isInChannel) {
if (!isDMResult) {
if (!channel.isGroupDM()) {
2026-07-29 08:29:29 +00:00
const intl3 = tmp3(_7hwn2A[25]).intl;
2026-07-20 16:05:17 +00:00
const string2 = intl3.string;
2026-07-29 08:29:29 +00:00
const t2 = tmp3(_7hwn2A[25]).t;
2026-07-20 16:05:17 +00:00
if (isGuildStageVoiceResult) {
let string2Result = string2(t2.Acqcot);
} else {
string2Result = string2(t2.BXxdl7);
}
}
}
2026-07-29 08:29:29 +00:00
const intl4 = tmp3(_7hwn2A[25]).intl;
string2Result = intl4.string(_7hwn2A);
2026-07-20 16:05:17 +00:00
} else {
if (!isDMResult) {
if (!channel.isGroupDM()) {
2026-07-29 08:29:29 +00:00
const intl = tmp3(_7hwn2A[25]).intl;
2026-07-20 16:05:17 +00:00
const string = intl.string;
2026-07-29 08:29:29 +00:00
const t = tmp3(_7hwn2A[25]).t;
2026-07-20 16:05:17 +00:00
if (isGuildStageVoiceResult) {
2026-07-23 10:11:24 +00:00
let stringResult = string(t["7vb2cc"]);
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
stringResult = string(t["96ANUN"]);
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
let obj = { text: null, variant: null, grow: true, onPress: null };
obj[0] = stringResult;
2026-07-20 16:05:17 +00:00
let str = "active";
if (isInChannel) {
str = "secondary";
}
2026-07-29 08:29:29 +00:00
obj[1] = str;
obj[3] = function onPress() {
2026-07-20 16:05:17 +00:00
callback({ action: "PRESS_JOIN_CALL_BUTTON" });
2026-08-26 06:04:24 +00:00
closure_1_1(newestAnalyticsLocation[28]).hideAllActionSheets();
2026-08-24 06:08:38 +00:00
const obj = closure_1_1(newestAnalyticsLocation[28]);
closure_1_1(newestAnalyticsLocation[37]).popAll();
const obj2 = closure_1_1(newestAnalyticsLocation[37]);
2026-07-20 16:05:17 +00:00
const rootNavigationRef = channel(newestAnalyticsLocation[38]).getRootNavigationRef();
let isReadyResult;
2026-07-29 08:29:29 +00:00
if (rootNavigationRef != null) {
2026-07-20 16:05:17 +00:00
isReadyResult = rootNavigationRef.isReady();
}
2026-07-29 08:29:29 +00:00
let tmp7 = true === isReadyResult;
if (tmp7) {
2026-07-20 16:05:17 +00:00
const currentRoute = rootNavigationRef.getCurrentRoute();
let name;
2026-07-29 08:29:29 +00:00
if (currentRoute != null) {
2026-07-20 16:05:17 +00:00
name = currentRoute.name;
}
2026-07-29 08:29:29 +00:00
tmp7 = "you" === name;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp7) {
2026-07-20 16:05:17 +00:00
rootNavigationRef.goBack();
}
2026-07-29 08:29:29 +00:00
if (c3) {
let tmp5Result = tmp5(tmp2[39]);
tmp5Result.connectAndOpen(channel);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
tmp5Result = tmp5(tmp2[40]);
tmp5Result.openGuildVoiceModal(channel, newestAnalyticsLocation);
2026-07-20 16:05:17 +00:00
}
};
2026-07-29 08:29:29 +00:00
return jsx(channel(newestAnalyticsLocation[24]).Button, { text: null, variant: null, grow: true, onPress: null });
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const intl2 = tmp3(_7hwn2A[25]).intl;
stringResult = intl2.string(tmp3(_7hwn2A[25]).t.ozoE2A);
2026-07-20 16:05:17 +00:00
}
};
export const ConnectPlatformButton = function ConnectPlatformButton(type) {
type = type.type;
2026-07-23 10:11:24 +00:00
const onAction = type.onAction;
2026-07-29 08:29:29 +00:00
let newestAnalyticsLocation;
2026-08-24 06:08:38 +00:00
c3 = undefined;
2026-07-23 10:11:24 +00:00
newestAnalyticsLocation = onAction(newestAnalyticsLocation[18])().newestAnalyticsLocation;
let obj = type(newestAnalyticsLocation[20]);
2026-08-24 06:08:38 +00:00
const items = [closure_6];
if (obj.useStateFromStores(items, () => null != closure_1_6.getAccount(null, type))) {
2026-07-20 16:05:17 +00:00
return null;
} else {
2026-07-29 08:29:29 +00:00
const value = tmp2(tmp3[41]).get(type);
2026-07-23 10:11:24 +00:00
c3 = value;
2026-07-29 08:29:29 +00:00
obj = { text: null, icon: null, variant: "secondary", onPress: null };
const intl = tmp4(tmp3[25]).intl;
obj = { platform: null };
obj[0] = value.name;
obj[0] = intl.formatToPlainString(tmp4(tmp3[25]).t.XWSHTb, obj);
2026-08-24 06:08:38 +00:00
obj1 = { size: null, source: null, disableColor: true, style: null };
2026-07-29 08:29:29 +00:00
obj1[0] = tmp4(tmp3[31]).Icon.Sizes.SMALL;
const tmp2Result = tmp2(tmp3[41]);
obj1[1] = tmp4(tmp3[42]).makeSource(value.icon.whitePNG);
obj1[3] = tmp.icon;
obj[1] = jsx(tmp4(tmp3[31]).Icon, { size: null, source: null, disableColor: true, style: null });
obj[3] = function onPress() {
2026-07-20 16:05:17 +00:00
let str = "PRESS_CONNECT_XBOX_BUTTON";
2026-08-24 06:08:38 +00:00
if (type === closure_1_15.PLAYSTATION) {
2026-07-20 16:05:17 +00:00
str = "PRESS_CONNECT_PLAYSTATION_BUTTON";
}
2026-07-29 08:29:29 +00:00
onAction({ action: str });
onAction(newestAnalyticsLocation[43])({
2026-07-23 10:11:24 +00:00
platformType: _undefined.type,
2026-07-20 16:05:17 +00:00
location: newestAnalyticsLocation,
onClose() {
2026-07-29 08:29:29 +00:00
let obj = callback(table[44]);
obj = { screen: constants.CONNECTIONS };
2026-07-20 16:05:17 +00:00
return obj.openUserSettings(obj);
}
2026-07-29 08:29:29 +00:00
});
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
return jsx(tmp4(tmp3[24]).Button, { platform: null });
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
tmp = callback2();
2026-07-29 08:29:29 +00:00
tmp2 = onAction;
2026-07-20 16:05:17 +00:00
};
export const CustomActivityButton = function CustomActivityButton(index) {
2026-07-23 10:11:24 +00:00
({ user: require, activity } = index);
2026-07-20 16:05:17 +00:00
index = index.index;
2026-07-23 10:11:24 +00:00
const onAction = index.onAction;
2026-07-20 16:05:17 +00:00
let tmp = null;
if (null != activity.buttons) {
tmp = null;
if (index < activity.buttons.length) {
2026-07-29 08:29:29 +00:00
let obj = index;
2026-07-23 10:11:24 +00:00
if (activity(index[45])(activity)) {
2026-07-29 08:29:29 +00:00
const intl = tmp3(obj[25]).intl;
let stringResult = intl.string(tmp3(obj[25]).t.I6JG46);
2026-07-20 16:05:17 +00:00
} else {
stringResult = activity.buttons[index];
}
2026-07-29 08:29:29 +00:00
obj = { text: null, variant: "secondary", onPress: null };
obj[0] = stringResult;
obj[2] = onAction(function*() {
if (c5 === 2) {
c5 = 3;
HermesBuiltin.throwTypeError();
} else if (tmp6 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} else {
try {
c5 = 2;
if (0 === c4) {
if (arg0 === 1) {
c5 = 3;
throw arg1;
} else if (arg0 === 2) {
c5 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-24 06:08:38 +00:00
closure_1 = tmp3;
closure_0 = tmp7;
2026-07-29 08:29:29 +00:00
closure_0 = undefined;
closure_1 = undefined;
2026-08-24 06:08:38 +00:00
closure_2 = undefined;
2026-07-29 08:29:29 +00:00
let v0;
v0({ action: "PRESS_CUSTOM_BUTTON" });
v0 = 1;
c4 = 2;
c5 = 1;
2026-08-24 06:08:38 +00:00
obj1 = { value: null, done: false };
obj1[0] = closure_1_0(closure_1_2[46]).getMetadata(closure_1_1, closure_1_0.id);
2026-07-29 08:29:29 +00:00
return obj1;
}
} else {
if (1 === tmp7) {
v0 = 0;
c5 = 3;
} else if (arg0 === 1) {
c5 = 3;
throw arg1;
} else if (arg0 === 2) {
v0 = 0;
c5 = 3;
const obj2 = { value: null, done: true };
obj2[0] = arg1;
return obj2;
} else {
closure_0 = arg1;
if (closure_0.button_urls.length <= closure_2) {
v0 = 0;
c5 = 3;
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
} else {
closure_1 = closure_0.button_urls[closure_2];
2026-08-04 21:03:28 +00:00
if (typeof closure_1 !== "string") {
2026-07-29 08:29:29 +00:00
v0 = 0;
c5 = 3;
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
} else {
2026-08-24 06:08:38 +00:00
closure_2 = closure_1_1(closure_1_2[47]).safeParseWithQuery(closure_1);
2026-07-29 08:29:29 +00:00
let protocol;
if (closure_2 != null) {
protocol = closure_2.protocol;
}
if (null != protocol) {
let hostname;
if (closure_2 != null) {
hostname = closure_2.hostname;
}
if (null != hostname) {
2026-08-24 06:08:38 +00:00
obj = closure_1_1(closure_1_2[47]);
2026-07-29 08:29:29 +00:00
v0 = obj.format(closure_2);
2026-08-24 06:08:38 +00:00
obj1 = closure_1_0(closure_1_2[48]);
2026-07-29 08:29:29 +00:00
const obj3 = { href: null, onConfirm: null, trusted: false };
obj3[0] = v0;
obj3[1] = function onConfirm() {
return callback(tmp20[34]).openURL(c3);
};
obj1.handleClick(obj3);
v0 = 0;
}
}
2026-08-24 06:08:38 +00:00
const obj8 = closure_1_1(closure_1_2[47]);
2026-07-29 08:29:29 +00:00
}
}
}
v0 = 0;
c5 = 3;
2026-09-01 10:26:29 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} catch (tmp20) {
closure_2 = tmp20;
if (tmp4 === v0) {
c5 = tmp2;
throw tmp20;
} else {
c4 = tmp;
}
}
}
});
jsx(require(index[24]).Button, { text: null, variant: "secondary", onPress: null });
2026-07-20 16:05:17 +00:00
const tmp2 = jsx;
}
}
return tmp;
};