2026-09-25 08:38:05 +00:00
|
|
|
// Module ID: 11612
|
|
|
|
|
// Function ID: 11613
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: useShowTryItOutButtonInAppLauncher
|
2026-09-25 08:38:05 +00:00
|
|
|
// Dependencies: [8782, 11613, 8775, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: default
|
|
|
|
|
|
2026-09-25 08:38:05 +00:00
|
|
|
// Module 11612 (useShowTryItOutButtonInAppLauncher)
|
|
|
|
|
import getPrimaryAppCommand from "getPrimaryAppCommand" /* 8782 */;
|
|
|
|
|
import useIsAppDMDefault from "useIsAppDM" /* 11613 */;
|
2026-09-10 05:38:07 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
2026-08-24 06:08:38 +00:00
|
|
|
|
2026-09-25 08:38:05 +00:00
|
|
|
const canLaunchFrame = tmp(8775);
|
2026-09-10 05:38:07 +00:00
|
|
|
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);
|
2026-09-10 05:38:07 +00:00
|
|
|
let isPrimaryAppCommandUsableInAppDM = getPrimaryAppCommand.useIsPrimaryAppCommandUsableInAppDM({ context, applicationId: application.id, botUserId });
|
2026-07-20 16:05:17 +00:00
|
|
|
let channel;
|
2026-09-10 05:38:07 +00:00
|
|
|
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
|
|
|
};
|