decord/alpha/source/modules/links/native/showLongPressURLActionSheet.tsx

126 lines
3.8 KiB
TypeScript
Raw Permalink Normal View History

2026-10-12 06:59:38 +00:00
// Module ID: 9674
// Function ID: 9675
2026-07-20 16:05:17 +00:00
// Name: showLongPressURLActionSheet
2026-10-12 06:59:38 +00:00
// Dependencies: [5057, 1126, 4808, 6886, 4806, 8482, 9675, 6891, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-10-12 06:59:38 +00:00
// Module 9674 (showLongPressURLActionSheet)
2026-10-10 08:08:14 +00:00
import LinkingDefault from "Linking" /* 4806 */;
import ToastUtils from "ToastUtils" /* 4808 */;
2026-10-12 06:59:38 +00:00
import ClipboardUtils from "ClipboardUtils" /* 6886 */;
import showShareActionSheet from "showShareActionSheet" /* 8482 */;
import handleContentLinkingDefault from "handleContentLinking" /* 9675 */;
import size from "module_2" /* 2 */;
2026-08-24 06:08:38 +00:00
let result = size.fileFinishedImporting("modules/links/native/showLongPressURLActionSheet.tsx");
2026-07-20 16:05:17 +00:00
export default function showLongPressURLActionSheet(urlString) {
2026-10-03 08:58:59 +00:00
let channelId;
let closure_3;
let disableHapticFeedback;
let guildId;
let intl;
let intl2;
let intl3;
let intl4;
let intl5;
let intl6;
let messageId;
let obj9;
2026-07-23 10:11:24 +00:00
const str = urlString.urlString;
({ guildId: importDefault, channelId } = urlString);
2026-07-20 16:05:17 +00:00
({ messageId: closure_3, disableHapticFeedback } = urlString);
if (disableHapticFeedback === undefined) {
disableHapticFeedback = false;
}
let match;
if (!disableHapticFeedback) {
2026-07-23 10:11:24 +00:00
let obj = str(channelId[0]);
2026-10-03 08:58:59 +00:00
const result = obj.triggerHapticFeedback(str(channelId[0]).HapticFeedbackTypes.IMPACT_LIGHT);
2026-07-20 16:05:17 +00:00
}
const items = [];
match = str.match(/^(tel|sms|mailto):([^?;]+)/);
if (null != match) {
2026-10-03 08:58:59 +00:00
let ZYLVKo;
const push2 = items.push;
2026-07-23 10:11:24 +00:00
const intl7 = str(channelId[1]).intl;
2026-10-03 08:58:59 +00:00
const string = intl7.string;
2026-07-20 16:05:17 +00:00
if ("mailto" === match[1]) {
2026-10-03 08:58:59 +00:00
ZYLVKo = tmp15(tmp16[1]).t.ZYLVKo;
2026-07-20 16:05:17 +00:00
} else {
2026-10-03 08:58:59 +00:00
ZYLVKo = tmp15(tmp16[1]).t["3zozoR"];
2026-07-20 16:05:17 +00:00
}
2026-10-03 08:58:59 +00:00
let obj2 = {
label: string(ZYLVKo),
onPress() {
2026-10-03 08:58:59 +00:00
const obj = ToastUtils;
obj.presentLinkCopied();
const obj2 = ClipboardUtils;
obj2.copy(match[2]);
}
2026-07-20 16:05:17 +00:00
};
2026-10-03 08:58:59 +00:00
push2(obj2);
2026-07-20 16:05:17 +00:00
if ("tel" === match[1]) {
2026-10-03 08:58:59 +00:00
const push = items.push;
const obj3 = {
label: intl.string(str(channelId[1]).t["+wbjMW"]),
onPress() {
const obj = LinkingDefault;
obj.openURL(str.replace("tel:", "sms:"));
}
2026-07-20 16:05:17 +00:00
};
2026-10-03 08:58:59 +00:00
intl = tmp15(tmp16[1]).intl;
push(obj3);
2026-07-20 16:05:17 +00:00
}
}
2026-10-03 08:58:59 +00:00
const obj4 = {
label: intl2.string(str(channelId[1]).t.wuRE8M),
onPress() {
const obj = LinkingDefault;
obj.openURL(str);
}
2026-07-20 16:05:17 +00:00
};
2026-10-03 08:58:59 +00:00
intl2 = str(channelId[1]).intl;
const items1 = [obj4, , ];
2026-10-03 08:58:59 +00:00
const obj5 = {
label: intl3.string(str(channelId[1]).t.WqhZss),
onPress() {
const obj = ToastUtils;
obj.presentLinkCopied();
const obj2 = ClipboardUtils;
obj2.copy(str);
}
2026-07-20 16:05:17 +00:00
};
2026-10-03 08:58:59 +00:00
intl3 = str(channelId[1]).intl;
items1[1] = obj5;
2026-10-03 08:58:59 +00:00
const obj6 = {
label: intl4.string(str(channelId[1]).t.Ej3B3Y),
onPress() {
const obj = showShareActionSheet;
const obj2 = { url: str };
obj.showShareActionSheet(obj2, "Share Link");
}
2026-07-20 16:05:17 +00:00
};
2026-10-03 08:58:59 +00:00
const arraySpreadResult = HermesBuiltin.arraySpread(items1, items, 2);
intl4 = str(channelId[1]).intl;
items1[arraySpreadResult] = obj6;
2026-07-20 16:05:17 +00:00
if (null != channelId) {
2026-10-03 08:58:59 +00:00
const unshift = items1.unshift;
const obj7 = {
label: intl5.string(str(channelId[1]).t.aW2YlJ),
onPress() {
const obj = { guildId: importDefault, channelId, messageId, navigationSettings: { navigationReplace: true, safe: true } };
handleContentLinkingDefault(obj);
}
2026-07-20 16:05:17 +00:00
};
2026-10-03 08:58:59 +00:00
intl5 = tmp9(tmp10[1]).intl;
unshift(obj7);
2026-07-20 16:05:17 +00:00
}
2026-10-03 08:58:59 +00:00
const obj8 = { key: "LongPressUrl", header: obj9, options: items1, hasIcons: false };
obj9 = { title: intl6.string(str(channelId[1]).t["5oIOLX"]), subtitle: str };
const showSimpleActionSheet = str(channelId[7]).showSimpleActionSheet;
str(channelId[7]);
intl6 = tmp9(tmp10[1]).intl;
const result1 = showSimpleActionSheet(obj8);
2026-07-20 16:05:17 +00:00
};