decord/source/modules/share/native/AppShare.tsx

107 lines
3.7 KiB
TypeScript
Raw Normal View History

2026-07-28 08:39:19 +00:00
// Module ID: 16728
// Function ID: 130272
2026-07-20 16:05:17 +00:00
// Name: AppShare
2026-07-28 08:39:19 +00:00
// Dependencies: [57, 31, 27, 5702, 13437, 1194, 653, 11485, 33, 566, 5623, 477, 13476, 11488, 5713, 675, 4594, 13585, 13015, 1553, 8173, 5618, 15700, 15744, 4510, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-28 08:39:19 +00:00
// Module 16728 (AppShare)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray";
import closure_4 from "result";
import get_ActivityIndicator from "get ActivityIndicator";
import result from "result";
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import closure_7 from "_isNativeReflectConstruct";
import { AnalyticEvents } from "ME";
import { MultiAccountSwitchLocation as closure_9 } from "MAX_ACCOUNTS";
import jsxProd from "jsxProd";
let closure_10;
let closure_11;
let closure_5;
let closure_6;
const require = arg1;
({ BackHandler: closure_5, NativeModules: closure_6 } = get_ActivityIndicator);
({ jsx: closure_10, jsxs: closure_11 } = jsxProd);
result = require("get ActivityIndicator").fileFinishedImporting("modules/share/native/AppShare.tsx");
2026-07-20 16:05:17 +00:00
export default function AppShare(attachments) {
2026-07-23 10:11:24 +00:00
const _require = attachments;
(function useAuthenticated() {
const items = [outer1_7];
const stateFromStores = attachments(outer1_2[9]).useStateFromStores(items, () => outer2_7.isAuthenticated());
2026-07-20 16:05:17 +00:00
const items1 = [stateFromStores];
2026-07-23 10:11:24 +00:00
const effect = outer1_4.useEffect(() => {
2026-07-20 16:05:17 +00:00
if (stateFromStores) {
2026-07-23 10:11:24 +00:00
outer2_1(outer2_2[10]).startSession(outer2_7.getToken());
const obj = outer2_1(outer2_2[10]);
2026-07-20 16:05:17 +00:00
if (obj2.isAndroid()) {
2026-07-23 10:11:24 +00:00
const NativePermissionManager = outer2_6.NativePermissionManager;
2026-07-20 16:05:17 +00:00
const notificationAuthorization = NativePermissionManager.requestNotificationAuthorization();
}
2026-07-23 10:11:24 +00:00
obj2 = stateFromStores(outer2_2[11]);
2026-07-20 16:05:17 +00:00
}
}, items1);
2026-07-23 10:11:24 +00:00
})();
let items = [attachments.attachments.length, attachments.text];
let effect = React.useEffect(() => {
let obj = outer1_1(outer1_2[15]);
2026-07-20 16:05:17 +00:00
obj = {};
2026-07-23 10:11:24 +00:00
let tmp = null != attachments.text;
2026-07-20 16:05:17 +00:00
if (tmp) {
2026-07-23 10:11:24 +00:00
tmp = attachments.text.length > 0;
2026-07-20 16:05:17 +00:00
}
obj.has_content = tmp;
2026-07-23 10:11:24 +00:00
obj.has_attachment = attachments.attachments.length > 0;
obj.track(outer1_8.EXTERNAL_SHARE_OPENED, obj);
2026-07-20 16:05:17 +00:00
}, items);
2026-07-28 08:39:19 +00:00
importDefault(4594)(() => {
2026-07-20 16:05:17 +00:00
let mimeTypes;
let numAttachments;
2026-07-23 10:11:24 +00:00
attachments = attachments.attachments;
2026-07-20 16:05:17 +00:00
({ numAttachments, mimeTypes } = {
2026-07-23 10:11:24 +00:00
numAttachments: attachments.attachments.length,
2026-07-20 16:05:17 +00:00
mimeTypes: attachments.map((mimeType) => {
mimeType = mimeType.mimeType;
let str = "unknown";
if (null != mimeType) {
str = mimeType;
}
return str;
})
});
const obj = {
2026-07-23 10:11:24 +00:00
numAttachments: attachments.attachments.length,
2026-07-20 16:05:17 +00:00
mimeTypes: attachments.map((mimeType) => {
mimeType = mimeType.mimeType;
let str = "unknown";
if (null != mimeType) {
str = mimeType;
}
return str;
})
};
2026-07-23 10:11:24 +00:00
attachments(outer1_2[14]).trackAppUIViewed("share", { share_num_attachments: numAttachments, share_attachment_mimetypes: mimeTypes });
2026-07-20 16:05:17 +00:00
});
let obj = { appEntryKey: "share" };
if (tmp) {
obj = { appEntryKey: "share", sharedContent: attachments };
2026-07-28 08:39:19 +00:00
const tmp12 = importDefault(13015);
2026-07-20 16:05:17 +00:00
if (obj3.isMetaQuest()) {
2026-07-28 08:39:19 +00:00
let exitApp = importDefault(8173).close;
2026-07-20 16:05:17 +00:00
} else {
exitApp = exitApp.exitApp;
}
obj.onClose = exitApp;
tmp7(tmp12, obj);
2026-07-23 10:11:24 +00:00
obj3 = _require(1553);
2026-07-20 16:05:17 +00:00
} else {
2026-07-28 08:39:19 +00:00
let items1 = [tmp7(_require(5618).SceneLoadingIndicator, {}), , , ];
2026-07-20 16:05:17 +00:00
obj = { appEntryKey: "share" };
2026-07-28 08:39:19 +00:00
items1[1] = callback(_require(15700).ActionSheetContainer, obj);
items1[2] = callback(importDefault(15744), {});
items1[3] = callback(_require(4510).AlertModalContainer, {});
2026-07-20 16:05:17 +00:00
obj.children = items1;
return closure_11(tmp6, obj);
}
};