/* Metro module 1577; source: unknown; dependencies: [31, 1487, 1562] */ 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}); const env0_3 = importAll(31) /* metro dependency 31 */; 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 binding = env0_3; const useContext = binding.useContext; const NavigationHelpersContext = (require(1487) /* metro dependency 1487 */).NavigationHelpersContext; return binding.useCallback(_fun17584, [binding.useContext(importDefault(1562) /* metro dependency 1562 */), Reflect.apply(useContext, binding, [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 object2; var value3; var getRootStateForNavigateBinding; var value; const options = env0_1.options; const value2 = undefined; if ((options == null ? value2 : options.enabled) !== false) { binding = env0_0; object2 = {}; if (binding) { value3 = environment.__proto__; getRootStateForNavigateBinding = getRootStateForNavigate; binding = env0_0; object2.index = 0; object2.routes = [{name: a0, params: a1}]; r3 = getRootStateForNavigateBinding(binding, object2); } else { object2.index = 0; object2.routes = [{name: a0, params: a1}]; r3 = object2; } 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; }