decord/source/modules/channel/hooks/useRequiredLinkedLobbyApplicationAuthorization.tsx

108 lines
4.2 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 11681
// Function ID: 11682
2026-07-20 16:05:17 +00:00
// Name: useRequiredLinkedLobbyApplicationAuthorization
2026-08-05 07:35:12 +00:00
// Dependencies: [19, 4292, 5203, 589, 5603, 5596, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-05 07:35:12 +00:00
// Module 11681 (useRequiredLinkedLobbyApplicationAuthorization)
2026-07-29 08:29:29 +00:00
import { useEffect } from "noop";
import addApplication from "addApplication";
import recomputeFromAppTokens from "recomputeFromAppTokens";
import { FetchState } from "recomputeFromAppTokens";
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
const result = require("recomputeFromAppTokens").fileFinishedImporting("modules/channel/hooks/useRequiredLinkedLobbyApplicationAuthorization.tsx");
2026-07-20 16:05:17 +00:00
export default function useRequiredLinkedLobbyApplicationAuthorization(require_application_authorization) {
2026-07-29 08:29:29 +00:00
let prop;
if (require_application_authorization != null) {
prop = require_application_authorization.require_application_authorization;
}
2026-07-20 16:05:17 +00:00
let application_id = null;
2026-07-29 08:29:29 +00:00
if (prop) {
application_id = require_application_authorization.application_id;
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
let obj = application_id(stateFromStores[3]);
2026-07-29 08:29:29 +00:00
let items = [recomputeFromAppTokens];
2026-07-23 10:11:24 +00:00
const stateFromStoresObject = obj.useStateFromStoresObject(items, () => ({ authorizationsFetchState: outer1_5.getFetchState(), applicationOAuth2Token: outer1_5.getNewestTokenForApplication(application_id) }));
2026-07-20 16:05:17 +00:00
const authorizationsFetchState = stateFromStoresObject.authorizationsFetchState;
const applicationOAuth2Token = stateFromStoresObject.applicationOAuth2Token;
2026-07-29 08:29:29 +00:00
const items1 = [addApplication];
2026-07-23 10:11:24 +00:00
stateFromStores = application_id(stateFromStores[3]).useStateFromStores(items1, () => outer1_4.getApplication(application_id));
const obj2 = application_id(stateFromStores[3]);
2026-07-29 08:29:29 +00:00
const items2 = [addApplication];
let stateFromStores1 = application_id(stateFromStores[3]).useStateFromStores(items2, () => {
2026-07-20 16:05:17 +00:00
let parentId;
2026-07-29 08:29:29 +00:00
if (stateFromStores != null) {
2026-07-20 16:05:17 +00:00
parentId = stateFromStores.parentId;
}
2026-07-23 10:11:24 +00:00
return outer1_4.getApplication(parentId);
2026-07-20 16:05:17 +00:00
});
const items3 = [authorizationsFetchState, application_id];
2026-07-23 10:11:24 +00:00
stateFromStores1(() => {
2026-07-20 16:05:17 +00:00
let tmp = null != application_id;
if (tmp) {
2026-07-23 10:11:24 +00:00
tmp = authorizationsFetchState === outer1_6.NOT_FETCHED;
2026-07-20 16:05:17 +00:00
}
if (tmp) {
const response = authorizationsFetchState(stateFromStores[4]).fetch();
const obj = authorizationsFetchState(stateFromStores[4]);
}
}, items3);
const items4 = [application_id, applicationOAuth2Token, authorizationsFetchState, stateFromStores];
2026-07-23 10:11:24 +00:00
stateFromStores1(() => {
2026-07-29 08:29:29 +00:00
let tmp2 = null != application_id;
if (tmp2) {
tmp2 = null == stateFromStores;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp2) {
tmp2 = authorizationsFetchState === outer1_6.FETCHED;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp2) {
2026-07-20 16:05:17 +00:00
const items = [application_id];
const applications = authorizationsFetchState(stateFromStores[5]).fetchApplications(items, false);
const obj = authorizationsFetchState(stateFromStores[5]);
}
}, items4);
const items5 = [stateFromStores, authorizationsFetchState, stateFromStores1];
2026-07-23 10:11:24 +00:00
stateFromStores1(() => {
2026-07-29 08:29:29 +00:00
let tmp2 = null != stateFromStores && null != tmp.parentId;
if (tmp2) {
tmp2 = null == stateFromStores1;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp2) {
tmp2 = authorizationsFetchState === outer1_6.FETCHED;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp2) {
const items = [tmp.parentId];
2026-07-20 16:05:17 +00:00
const applications = authorizationsFetchState(stateFromStores[5]).fetchApplications(items, false);
const obj = authorizationsFetchState(stateFromStores[5]);
}
}, items5);
2026-07-29 08:29:29 +00:00
let tmp9 = null != stateFromStores;
if (tmp9) {
tmp9 = null == stateFromStores.parentId || null != stateFromStores1;
const tmp10 = null == stateFromStores.parentId || null != stateFromStores1;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp11 = null != application_id;
if (tmp11) {
tmp11 = authorizationsFetchState !== FetchState.FETCHED || null == stateFromStores || !tmp9;
const tmp13 = authorizationsFetchState !== FetchState.FETCHED || null == stateFromStores || !tmp9;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { showLinkedLobbyApplicationLoadingIndicator: tmp11, requiredLinkedLobbyApplication: null };
let tmp14 = null;
2026-07-20 16:05:17 +00:00
if (null == applicationOAuth2Token) {
2026-07-29 08:29:29 +00:00
tmp14 = null;
2026-07-20 16:05:17 +00:00
if (null != stateFromStores) {
2026-07-29 08:29:29 +00:00
tmp14 = null;
if (tmp9) {
if (stateFromStores1 == null) {
stateFromStores1 = stateFromStores;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp14 = stateFromStores1;
2026-07-20 16:05:17 +00:00
}
}
}
2026-07-29 08:29:29 +00:00
obj[1] = tmp14;
2026-07-20 16:05:17 +00:00
return obj;
};