decord/source/modules/app_dms/useShowTryItOutButtonInAppLauncher.tsx

40 lines
1.4 KiB
TypeScript
Raw Normal View History

2026-09-01 10:26:29 +00:00
// Module ID: 11715
// Function ID: 11716
2026-07-20 16:05:17 +00:00
// Name: useShowTryItOutButtonInAppLauncher
2026-09-01 10:26:29 +00:00
// Dependencies: [9476, 9276, 9470, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-09-01 10:26:29 +00:00
// Module 11715 (useShowTryItOutButtonInAppLauncher)
2026-08-24 06:08:38 +00:00
import set from "set" /* 2 */;
2026-09-01 10:26:29 +00:00
import useIsAppDMDefault from "useIsAppDM" /* 9276 */;
import canLaunchFrame from "canLaunchFrame" /* 9470 */;
import _getPrimaryAppCommand from "_getPrimaryAppCommand" /* 9476 */;
2026-08-24 06:08:38 +00:00
const result = set.fileFinishedImporting("modules/app_dms/useShowTryItOutButtonInAppLauncher.tsx");
2026-07-20 16:05:17 +00:00
export default function useShowTryItOutButtonInAppLauncher(arg0) {
({ context, application, botUserId } = arg0);
2026-08-24 06:08:38 +00:00
let obj = _getPrimaryAppCommand;
2026-07-20 16:05:17 +00:00
obj = { context, applicationId: application.id, botUserId };
let isPrimaryAppCommandUsableInAppDM = obj.useIsPrimaryAppCommandUsableInAppDM(obj);
let channel;
if ("channel" === context.type) {
channel = context.channel;
}
2026-07-29 08:29:29 +00:00
const tmp = require;
2026-08-24 06:08:38 +00:00
const tmp4 = useIsAppDMDefault;
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
};