Files
2026-07-28 01:06:53 +03:00

68 lines
4.0 KiB
TypeScript

/* Metro module 15130; source: modules/auth/makeAuthenticated.tsx; dependencies: [31, 1226, 661, 33, 1355, 15131, 2] */
import AuthenticationStore from '../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as AuthenticationUtilsModule from '../../utils/AuthenticationUtils.tsx'; /* Metro dependency 1355 */
function _fun115338(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#115338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15327:6, offset: 0x0245d314, size: 176 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/auth/makeAuthenticated.tsx');
exports.makeAuthenticated = function(a0, a1) {
var value = a2;
var env0_0 = a0;
var env0_1 = a1;
var env0_2 = value !== undefined ? value : {passProps: true};
var closure = _fun115340;
closure.displayName = 'Authenticated(' + (a0.displayName ?? a0.name ?? '<Unknown>') + ')';
return closure;
};
function makeAuthenticated(a0, a1) { // fn#115339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15327:238, offset: 0x0245d3c4, size: 119 bytes, params: 3, frame: 14
const value = a2;
const env0_0 = a0;
const env0_1 = a1;
const r1 = value !== undefined ? value : {passProps: true};
const Authenticated2 = Authenticated;
Authenticated2.displayName = 'Authenticated(' + (a0.displayName ?? a0.name ?? '<Unknown>') + ')';
return Authenticated2;
function Authenticated(a0) { // fn#115340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15327:295, owner: makeAuthenticated.Authenticated, offset: 0x0245d43b, size: 240 bytes, params: 2, frame: 19
var r0;
var authenticationStoreBinding;
let value = a0;
if (AuthenticationUtilsModule.isAuthenticated()) {
value = ((Component) => <Component {...env0_2.passProps ? value : null} />)(env0_0);
r0 = value;
} else if (AuthenticationStore.getLoginStatus() === LoginStates.LOGGING_IN) {
value = ((Component) => <Component {...env0_2.passProps ? value : null} />)(env0_0);
r0 = value;
} else {
authenticationStoreBinding = AuthenticationStore;
if (authenticationStoreBinding.allowLogoutRedirect()) {
if (require != null) {
value = importDefault(15131) /* metro dependency 15131: RedirectUnauthenticated */;
value = ((Component) => <Component renderRedirect={((Component) => <Component />)(value)} />)(require);
r0 = value;
} else {
value = importDefault(15131) /* metro dependency 15131: RedirectUnauthenticated */;
value = ((Component) => <Component />)(value);
r0 = value;
}
} else {
value = ((Component) => <Component {...env0_2.passProps ? value : null} />)(env0_0);
r0 = value;
}
}
return r0;
}
}
}
global.__d(_fun115338, 15130, [31, 1226, 661, 33, 1355, 15131,
2]) /* metro module 15130, dependencies: [31, 1226, 661, 33, 1355, 15131, 2] */;