37 lines
1.3 KiB
TypeScript
37 lines
1.3 KiB
TypeScript
// Module ID: 11416
|
|
// Function ID: 11417
|
|
// Name: useShowTryItOutButtonInAppLauncher
|
|
// Dependencies: [10857, 11417, 10481, 2]
|
|
// Exports: default
|
|
|
|
// Module 11416 (useShowTryItOutButtonInAppLauncher)
|
|
const result = require("canLaunchFrame").fileFinishedImporting("modules/app_dms/useShowTryItOutButtonInAppLauncher.tsx");
|
|
|
|
export default function useShowTryItOutButtonInAppLauncher(arg0) {
|
|
let application;
|
|
let botUserId;
|
|
let context;
|
|
({ context, application, botUserId } = arg0);
|
|
let obj = require(10857) /* _getPrimaryAppCommand */;
|
|
obj = { context, applicationId: application.id, botUserId };
|
|
let isPrimaryAppCommandUsableInAppDM = obj.useIsPrimaryAppCommandUsableInAppDM(obj);
|
|
let channel;
|
|
if ("channel" === context.type) {
|
|
channel = context.channel;
|
|
}
|
|
const tmp = require;
|
|
const tmp4 = importDefault(11417);
|
|
const tmp4Result = importDefault(11417)(channel);
|
|
const canLaunchFrameResult = tmp(10481).canLaunchFrame(application);
|
|
let tmp8 = !canLaunchFrameResult;
|
|
if (!canLaunchFrameResult) {
|
|
if (isPrimaryAppCommandUsableInAppDM) {
|
|
isPrimaryAppCommandUsableInAppDM = null != botUserId;
|
|
}
|
|
if (isPrimaryAppCommandUsableInAppDM) {
|
|
isPrimaryAppCommandUsableInAppDM = !tmp4Result;
|
|
}
|
|
tmp8 = isPrimaryAppCommandUsableInAppDM;
|
|
}
|
|
return tmp8;
|
|
};
|