{"dependencies":[{"name":"./useRouteCache.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":3,"column":0,"index":15},"end":{"line":3,"column":49,"index":64}}],"key":"7Wwgyr1YruLrWKgk0bZ/DNlglOg=","exportNames":["*"]}}],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.getFocusedRouteNameFromRoute = getFocusedRouteNameFromRoute;\n var _useRouteCache = require(_dependencyMap[0], \"./useRouteCache.js\");\n function getFocusedRouteNameFromRoute(route) {\n // @ts-expect-error: this isn't in type definitions coz we want this private\n const state = route[_useRouteCache.CHILD_STATE] ?? route.state;\n const params = route.params;\n const routeName = state ?\n // Get the currently active route name in the nested navigator\n state.routes[\n // If we have a partial state without index, for tab/drawer, first screen will be focused one, and last for stack\n // The type property will only exist for rehydrated state and not for state from deep link\n state.index ?? (typeof state.type === 'string' && state.type !== 'stack' ? 0 : state.routes.length - 1)].name :\n // If state doesn't exist, we need to default to `screen` param if available\n typeof params?.screen === 'string' ? params.screen : undefined;\n return routeName;\n }\n});","lineCount":23,"map":[[2,2,1,0],[2,14,1,12],[4,2,1,13,"Object"],[4,8,1,13],[4,9,1,13,"defineProperty"],[4,23,1,13],[4,24,1,13,"exports"],[4,31,1,13],[5,4,1,13,"value"],[5,9,1,13],[6,2,1,13],[7,2,1,13,"exports"],[7,9,1,13],[7,10,1,13,"getFocusedRouteNameFromRoute"],[7,38,1,13],[7,41,1,13,"getFocusedRouteNameFromRoute"],[7,69,1,13],[8,2,3,0],[8,6,3,0,"_useRouteCache"],[8,20,3,0],[8,23,3,0,"require"],[8,30,3,0],[8,31,3,0,"_dependencyMap"],[8,45,3,0],[9,2,4,7],[9,11,4,16,"getFocusedRouteNameFromRoute"],[9,39,4,44,"getFocusedRouteNameFromRoute"],[9,40,4,45,"route"],[9,45,4,50],[9,47,4,52],[10,4,5,2],[11,4,6,2],[11,10,6,8,"state"],[11,15,6,13],[11,18,6,16,"route"],[11,23,6,21],[11,24,6,22,"CHILD_STATE"],[11,50,6,33],[11,51,6,34],[11,55,6,38,"route"],[11,60,6,43],[11,61,6,44,"state"],[11,66,6,49],[12,4,7,2],[12,10,7,8,"params"],[12,16,7,14],[12,19,7,17,"route"],[12,24,7,22],[12,25,7,23,"params"],[12,31,7,29],[13,4,8,2],[13,10,8,8,"routeName"],[13,19,8,17],[13,22,8,20,"state"],[13,27,8,25],[14,4,9,2],[15,4,10,2,"state"],[15,9,10,7],[15,10,10,8,"routes"],[15,16,10,14],[16,4,11,2],[17,4,12,2],[18,4,13,2,"state"],[18,9,13,7],[18,10,13,8,"index"],[18,15,13,13],[18,20,13,18],[18,27,13,25,"state"],[18,32,13,30],[18,33,13,31,"type"],[18,37,13,35],[18,42,13,40],[18,50,13,48],[18,54,13,52,"state"],[18,59,13,57],[18,60,13,58,"type"],[18,64,13,62],[18,69,13,67],[18,76,13,74],[18,79,13,77],[18,80,13,78],[18,83,13,81,"state"],[18,88,13,86],[18,89,13,87,"routes"],[18,95,13,93],[18,96,13,94,"length"],[18,102,13,100],[18,105,13,103],[18,106,13,104],[18,107,13,105],[18,108,13,106],[18,109,13,107,"name"],[18,113,13,111],[19,4,14,2],[20,4,15,2],[20,11,15,9,"params"],[20,17,15,15],[20,19,15,17,"screen"],[20,25,15,23],[20,30,15,28],[20,38,15,36],[20,41,15,39,"params"],[20,47,15,45],[20,48,15,46,"screen"],[20,54,15,52],[20,57,15,55,"undefined"],[20,66,15,64],[21,4,16,2],[21,11,16,9,"routeName"],[21,20,16,18],[22,2,17,0],[23,0,17,1],[23,3]],"functionMap":{"names":["","getFocusedRouteNameFromRoute"],"mappings":"AAA;OCG;CDa"}},"type":"js/module"}]}