decord/alpha/source/modules/app_dms/useShowTryItOutButtonInAppLauncher.tsx

37 lines
1.4 KiB
TypeScript
Raw Normal View History

// Module ID: 11612
// Function ID: 11613
2026-07-20 16:05:17 +00:00
// Name: useShowTryItOutButtonInAppLauncher
// Dependencies: [8782, 11613, 8775, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 11612 (useShowTryItOutButtonInAppLauncher)
import getPrimaryAppCommand from "getPrimaryAppCommand" /* 8782 */;
import useIsAppDMDefault from "useIsAppDM" /* 11613 */;
import size from "module_2" /* 2 */;
2026-08-24 06:08:38 +00:00
const canLaunchFrame = tmp(8775);
const result = size.fileFinishedImporting("modules/app_dms/useShowTryItOutButtonInAppLauncher.tsx");
2026-07-20 16:05:17 +00:00
export default function useShowTryItOutButtonInAppLauncher(arg0) {
({ context, application, botUserId } = arg0);
let isPrimaryAppCommandUsableInAppDM = getPrimaryAppCommand.useIsPrimaryAppCommandUsableInAppDM({ context, applicationId: application.id, botUserId });
2026-07-20 16:05:17 +00:00
let channel;
const obj2 = { context, applicationId: application.id, botUserId };
2026-07-20 16:05:17 +00:00
if ("channel" === context.type) {
channel = context.channel;
}
2026-08-24 06:08:38 +00:00
const tmp4Result = useIsAppDMDefault(channel);
const canLaunchFrameResult = canLaunchFrame.canLaunchFrame(application);
2026-07-29 08:29:29 +00:00
let tmp8 = !canLaunchFrameResult;
if (!canLaunchFrameResult) {
2026-07-20 16:05:17 +00:00
if (isPrimaryAppCommandUsableInAppDM) {
isPrimaryAppCommandUsableInAppDM = null != botUserId;
}
if (isPrimaryAppCommandUsableInAppDM) {
2026-07-29 08:29:29 +00:00
isPrimaryAppCommandUsableInAppDM = !tmp4Result;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp8 = isPrimaryAppCommandUsableInAppDM;
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
};