79 lines
4.0 KiB
JavaScript
79 lines
4.0 KiB
JavaScript
/* Metro module 1577; source: unknown; dependencies: [31, 1487, 1562] */
|
|
import Module01562 from './module-01562.js'; /* Metro dependency 1562 */
|
|
import * as ReactModule from './module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as Module01487Module from './module-01487.js'; /* Metro dependency 1487 */
|
|
|
|
function _fun17581(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#17581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1704:6, offset: 0x00e70568, size: 100 bytes, params: 8, frame: 17
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
exports.default = useLinkBuilder;
|
|
function getRootStateForNavigate(a0, a1) { // fn#17582, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1704:108, offset: 0x00e705cc, size: 112 bytes, params: 3, frame: 18
|
|
var state;
|
|
var getRootStateForNavigateBinding;
|
|
var Object;
|
|
const parent = a0.getParent();
|
|
if (parent) {
|
|
state = parent.getState();
|
|
getRootStateForNavigateBinding = getRootStateForNavigate;
|
|
Object = global.Object;
|
|
return getRootStateForNavigateBinding(parent, {index: 0, routes: [Object.assign({}, state.routes[state.index],
|
|
{state: a1})]});
|
|
}
|
|
return a1;
|
|
}
|
|
|
|
function useLinkBuilder() { // fn#17583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1704:288, offset: 0x00e7063c, size: 113 bytes, params: 1, frame: 17
|
|
const useContext = ReactModule.useContext;
|
|
const NavigationHelpersContext = (Module01487Module).NavigationHelpersContext;
|
|
return ReactModule.useCallback(_fun17584, [ReactModule.useContext(Module01562),
|
|
Reflect.apply(useContext, ReactModule, [NavigationHelpersContext])]);
|
|
function _fun17584(a0, a1) { // fn#17584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:1704:413, offset: 0x00e706ad, size: 227 bytes, params: 3, frame: 19
|
|
var r3;
|
|
var r0;
|
|
var binding;
|
|
var object;
|
|
var value3;
|
|
var getRootStateForNavigateBinding;
|
|
var value;
|
|
const options = env0_1.options;
|
|
const value2 = undefined;
|
|
if ((options == null ? value2 : options.enabled) !== false) {
|
|
binding = env0_0;
|
|
object = {};
|
|
if (binding) {
|
|
value3 = environment.__proto__;
|
|
getRootStateForNavigateBinding = getRootStateForNavigate;
|
|
binding = env0_0;
|
|
object.index = 0;
|
|
object.routes = [{name: a0, params: a1}];
|
|
r3 = getRootStateForNavigateBinding(binding, object);
|
|
} else {
|
|
object.index = 0;
|
|
object.routes = [{name: a0, params: a1}];
|
|
r3 = object;
|
|
}
|
|
if (options == null) {
|
|
value = environment.__proto__;
|
|
value = require(1487) /* metro dependency 1487 */;
|
|
value = value.getPathFromState(r3, options == null ? value2 : options.config);
|
|
r0 = value;
|
|
} else if (options.getPathFromState) {
|
|
r0 = options.getPathFromState(r3, options == null ? value2 : options.config);
|
|
} else {
|
|
value = environment.__proto__;
|
|
value = require(1487) /* metro dependency 1487 */;
|
|
value = value.getPathFromState(r3, options == null ? value2 : options.config);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
return value2;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun17581, 1577, [31, 1487, 1562]) /* metro module 1577, dependencies: [31, 1487, 1562] */;
|