decord/beta/source/modules/app_dms/useShowTryItOutButtonInAppLauncher.tsx
github-actions 84d017ff78 chore: update source for beta 348.6
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5021.js (118.4 MB)
2026-09-28 16:18:32 +00:00

36 lines
1.4 KiB
TypeScript

// Module ID: 11626
// Function ID: 11627
// Name: useShowTryItOutButtonInAppLauncher
// Dependencies: [8790, 11627, 8783, 2]
// Exports: default
// Module 11626 (useShowTryItOutButtonInAppLauncher)
import getPrimaryAppCommand from "getPrimaryAppCommand" /* 8790 */;
import useIsAppDMDefault from "useIsAppDM" /* 11627 */;
import size from "module_2" /* 2 */;
const canLaunchFrame = tmp(8783);
const result = size.fileFinishedImporting("modules/app_dms/useShowTryItOutButtonInAppLauncher.tsx");
export default function useShowTryItOutButtonInAppLauncher(arg0) {
({ context, application, botUserId } = arg0);
let isPrimaryAppCommandUsableInAppDM = getPrimaryAppCommand.useIsPrimaryAppCommandUsableInAppDM({ context, applicationId: application.id, botUserId });
let channel;
const obj2 = { context, applicationId: application.id, botUserId };
if ("channel" === context.type) {
channel = context.channel;
}
const tmp4Result = useIsAppDMDefault(channel);
const canLaunchFrameResult = canLaunchFrame.canLaunchFrame(application);
let tmp8 = !canLaunchFrameResult;
if (!canLaunchFrameResult) {
if (isPrimaryAppCommandUsableInAppDM) {
isPrimaryAppCommandUsableInAppDM = null != botUserId;
}
if (isPrimaryAppCommandUsableInAppDM) {
isPrimaryAppCommandUsableInAppDM = !tmp4Result;
}
tmp8 = isPrimaryAppCommandUsableInAppDM;
}
return tmp8;
};