decord/source/modules/app_launcher/utils/useLaunchingActivityButtonState.tsx

72 lines
2.5 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 11370
// Function ID: 11371
2026-07-20 16:05:17 +00:00
// Name: useLaunchingActivityButtonState
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 1390, 8745, 7183, 589, 8741, 6738, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 11370 (useLaunchingActivityButtonState)
import closure_3 from "noop" /* 19 */;
import closure_4 from "participantFromServer" /* 1390 */;
import closure_5 from "map" /* 8745 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/app_launcher/utils/useLaunchingActivityButtonState.tsx");
2026-07-20 16:05:17 +00:00
export default function useLaunchingActivityButtonState(applicationId) {
applicationId = applicationId.applicationId;
2026-07-23 10:11:24 +00:00
({ context: importDefault, onSubmissionComplete } = applicationId);
let stateFromStores1;
2026-08-24 06:08:38 +00:00
closure_4 = undefined;
2026-07-23 10:11:24 +00:00
let obj = applicationId(onSubmissionComplete[3]);
2026-07-20 16:05:17 +00:00
const getOrFetchApplication = obj.useGetOrFetchApplication(applicationId);
2026-08-24 06:08:38 +00:00
const items = [closure_4];
2026-07-23 10:11:24 +00:00
const stateFromStores = applicationId(onSubmissionComplete[4]).useStateFromStores(items, () => {
2026-07-20 16:05:17 +00:00
let id;
if ("channel" === closure_1.type) {
id = closure_1.channel.id;
}
2026-08-24 06:08:38 +00:00
return launchState.getLaunchState(applicationId, id);
2026-07-20 16:05:17 +00:00
});
2026-07-23 10:11:24 +00:00
const obj2 = applicationId(onSubmissionComplete[4]);
2026-07-29 08:29:29 +00:00
let tmp = applicationId;
2026-08-24 06:08:38 +00:00
const items1 = [closure_5];
2026-08-06 08:05:19 +00:00
stateFromStores1 = applicationId(onSubmissionComplete[4]).useStateFromStores(items1, () => {
2026-08-24 06:08:38 +00:00
const mainFrame = closure_1_5.getMainFrame();
2026-08-06 08:05:19 +00:00
let state;
if (mainFrame != null) {
state = mainFrame.state;
}
let tmp3 = "loading" === state;
if (tmp3) {
tmp3 = mainFrame.applicationId === applicationId;
}
return tmp3;
});
2026-07-20 16:05:17 +00:00
if (null == getOrFetchApplication) {
stateFromStores1 = null != stateFromStores && stateFromStores.isLaunching && stateFromStores.componentId === applicationId.launchingComponentId;
const tmp6 = null != stateFromStores && stateFromStores.isLaunching && stateFromStores.componentId === applicationId.launchingComponentId;
} else {
2026-07-29 08:29:29 +00:00
const tmpResult = tmp(tmp2[5]);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp7 = importDefault(tmp2[6])(stateFromStores1);
2026-08-24 06:08:38 +00:00
closure_4 = tmp7;
2026-07-20 16:05:17 +00:00
const items2 = [stateFromStores1, tmp7, onSubmissionComplete];
2026-07-23 10:11:24 +00:00
const effect = stateFromStores1.useEffect(() => {
2026-07-29 08:29:29 +00:00
let tmp = !stateFromStores1;
if (!stateFromStores1) {
2026-08-24 06:08:38 +00:00
tmp = closure_4;
2026-07-29 08:29:29 +00:00
}
2026-07-20 16:05:17 +00:00
if (tmp) {
2026-07-29 08:29:29 +00:00
if (onSubmissionComplete != null) {
tmp2();
2026-07-20 16:05:17 +00:00
}
}
}, items2);
2026-07-29 08:29:29 +00:00
obj = { submitting: stateFromStores1, wasSubmitting: null };
if (tmp7 == null) {
tmp7 = null;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[1] = tmp7;
2026-07-20 16:05:17 +00:00
return obj;
};