2026-07-27 11:26:19 +00:00
|
|
|
// Module ID: 11921
|
|
|
|
|
// Function ID: 92242
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: AddAppButton
|
2026-07-27 11:26:19 +00:00
|
|
|
// Dependencies: [5, 57, 31, 5669, 653, 1455, 33, 11260, 10938, 4099, 5490, 11244, 3831, 1443, 7562, 8661, 1212, 4544, 689, 5463, 4141, 3990, 1555, 675, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: default
|
|
|
|
|
|
2026-07-27 11:26:19 +00:00
|
|
|
// Module 11921 (AddAppButton)
|
2026-07-23 10:11:24 +00:00
|
|
|
import APP_LAUNCHER_BUILT_IN_SECTION_ICON from "APP_LAUNCHER_BUILT_IN_SECTION_ICON";
|
|
|
|
|
import _slicedToArray from "_slicedToArray";
|
|
|
|
|
import result from "result";
|
|
|
|
|
import { getSection } from "_isNativeReflectConstruct";
|
|
|
|
|
import { AnalyticEvents } from "ME";
|
|
|
|
|
import { AppLauncherRouteName } from "APP_LAUNCHER_BUILT_IN_SECTION_ICON";
|
|
|
|
|
import { jsx } from "jsxProd";
|
|
|
|
|
|
|
|
|
|
const require = arg1;
|
2026-07-20 16:05:17 +00:00
|
|
|
function AddAppButton(application) {
|
|
|
|
|
application = application.application;
|
|
|
|
|
const guildId = application.guildId;
|
2026-07-23 10:11:24 +00:00
|
|
|
let items = [, , , , ];
|
2026-07-20 16:05:17 +00:00
|
|
|
({ customInstallUrl: arr[0], id: arr[1], installParams: arr[2], integrationTypesConfig: arr[3] } = application);
|
|
|
|
|
items[4] = guildId;
|
|
|
|
|
[][0] = application;
|
|
|
|
|
const callback = React.useCallback(() => {
|
2026-07-23 10:11:24 +00:00
|
|
|
let obj = application(outer1_2[8]);
|
2026-07-20 16:05:17 +00:00
|
|
|
obj = { applicationId: application.id, customInstallUrl: application.customInstallUrl, installParams: application.installParams, integrationTypesConfig: application.integrationTypesConfig, guildId };
|
|
|
|
|
obj.installApplication(obj);
|
2026-07-23 10:11:24 +00:00
|
|
|
guildId(outer1_2[9]).hideActionSheet();
|
2026-07-20 16:05:17 +00:00
|
|
|
}, items);
|
|
|
|
|
const customInstallUrl = application.customInstallUrl;
|
|
|
|
|
if (null != customInstallUrl) {
|
2026-07-23 10:11:24 +00:00
|
|
|
let obj = guildId(1443);
|
2026-07-20 16:05:17 +00:00
|
|
|
if (!obj.isDiscordUrl(customInstallUrl)) {
|
2026-07-25 08:10:48 +00:00
|
|
|
let PlusSmallIcon = application(7562).LinkExternalSmallIcon;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
const items1 = [application];
|
|
|
|
|
const memo = React.useMemo(() => {
|
|
|
|
|
const obj = { name: "longpress" };
|
2026-07-23 10:11:24 +00:00
|
|
|
const intl = application(outer1_2[16]).intl;
|
|
|
|
|
obj.label = intl.string(application(outer1_2[16]).t.XWDihq);
|
2026-07-20 16:05:17 +00:00
|
|
|
const items = [obj];
|
|
|
|
|
return items;
|
|
|
|
|
}, []);
|
|
|
|
|
const callback1 = React.useCallback((nativeEvent) => {
|
|
|
|
|
if ("longPress" === nativeEvent.nativeEvent.actionName) {
|
2026-07-23 10:11:24 +00:00
|
|
|
const obj = application(outer1_2[10]);
|
|
|
|
|
obj.copy(application(outer1_2[11]).getApplicationInstallURL(application));
|
|
|
|
|
const obj2 = application(outer1_2[11]);
|
|
|
|
|
application(outer1_2[12]).presentLinkCopied();
|
|
|
|
|
const obj3 = application(outer1_2[12]);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
}, items1);
|
|
|
|
|
obj = {};
|
2026-07-23 10:11:24 +00:00
|
|
|
let intl = application(1212).intl;
|
|
|
|
|
obj.text = intl.string(application(1212).t.NgXl3C);
|
2026-07-20 16:05:17 +00:00
|
|
|
obj.onPress = callback;
|
|
|
|
|
obj.onLongPress = tmp2;
|
|
|
|
|
obj.accessibilityActions = memo;
|
|
|
|
|
obj.onAccessibilityAction = callback1;
|
2026-07-23 10:11:24 +00:00
|
|
|
obj = { size: "sm", color: guildId(689).colors.WHITE };
|
|
|
|
|
obj.icon = <PlusSmallIcon size="sm" color={guildId(689).colors.WHITE} />;
|
2026-07-25 08:10:48 +00:00
|
|
|
return jsx(application(4544).Button, { size: "sm", color: guildId(689).colors.WHITE });
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-25 08:10:48 +00:00
|
|
|
PlusSmallIcon = application(8661).PlusSmallIcon;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
function OpenAppButton(profileApplication) {
|
|
|
|
|
profileApplication = profileApplication.profileApplication;
|
|
|
|
|
const botUserId = profileApplication.botUserId;
|
|
|
|
|
const channel = profileApplication.channel;
|
|
|
|
|
const tmp2 = callback2(React.useState(false), 2);
|
|
|
|
|
let callback = tmp2[1];
|
|
|
|
|
// CreateGeneratorClosureLongIndex (0x67)
|
|
|
|
|
const items = [botUserId, channel, profileApplication.id];
|
|
|
|
|
callback = React.useCallback(callback(tmp), items);
|
|
|
|
|
const obj = {};
|
2026-07-23 10:11:24 +00:00
|
|
|
const intl = profileApplication(channel[16]).intl;
|
|
|
|
|
obj.text = intl.string(profileApplication(channel[16]).t["Cia+A8"]);
|
2026-07-20 16:05:17 +00:00
|
|
|
obj.loading = tmp2[0];
|
|
|
|
|
obj.onPress = callback;
|
2026-07-23 10:11:24 +00:00
|
|
|
return jsx(profileApplication(channel[17]).Button, {});
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-23 10:11:24 +00:00
|
|
|
const result = require("result").fileFinishedImporting("modules/user_profile/native/AddOrOpenAppButton.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export default function AddOrOpenAppButton(arg0) {
|
|
|
|
|
let application;
|
|
|
|
|
let botUserId;
|
|
|
|
|
let channel;
|
|
|
|
|
let guildId;
|
|
|
|
|
({ application, channel } = arg0);
|
|
|
|
|
({ botUserId, guildId } = arg0);
|
2026-07-27 11:26:19 +00:00
|
|
|
if (importDefault(11260)(channel)) {
|
2026-07-20 16:05:17 +00:00
|
|
|
if (null != channel) {
|
|
|
|
|
const obj = { profileApplication: application, botUserId, channel };
|
2026-07-23 10:11:24 +00:00
|
|
|
let tmp2 = <OpenAppButton profileApplication={application} botUserId={botUserId} channel={channel} />;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
return tmp2;
|
|
|
|
|
}
|
|
|
|
|
tmp2 = <AddAppButton application={application} guildId={guildId} />;
|
|
|
|
|
};
|