decord/source/1551_getFocusedRouteNameFromRoute.js

39 lines
912 B
JavaScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 1551
// Function ID: 1552
2026-07-20 16:05:17 +00:00
// Name: getFocusedRouteNameFromRoute
2026-08-15 05:55:55 +00:00
// Dependencies: [1552]
2026-07-20 16:05:17 +00:00
2026-08-15 05:55:55 +00:00
// Module 1551 (getFocusedRouteNameFromRoute)
2026-08-24 06:08:38 +00:00
import CHILD_STATE from "CHILD_STATE" /* 1552 */;
require = arg1;
2026-07-23 10:11:24 +00:00
const dependencyMap = arg6;
2026-08-06 08:05:19 +00:00
arg5.getFocusedRouteNameFromRoute = function getFocusedRouteNameFromRoute(state) {
2026-08-24 06:08:38 +00:00
state = state[CHILD_STATE.CHILD_STATE];
2026-07-29 08:29:29 +00:00
if (state == null) {
2026-07-20 16:05:17 +00:00
state = state.state;
}
const params = state.params;
if (state) {
({ index, routes } = state);
2026-07-29 08:29:29 +00:00
if (index == null) {
2026-08-04 21:03:28 +00:00
if (typeof state.type !== "string") {
2026-07-29 08:29:29 +00:00
let num2 = state.routes.length - 1;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
num2 = 0;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
index = num2;
2026-07-20 16:05:17 +00:00
}
let screen = routes[index].name;
} else {
screen = undefined;
2026-07-29 08:29:29 +00:00
if (params != null) {
2026-07-20 16:05:17 +00:00
screen = params.screen;
}
2026-08-04 21:03:28 +00:00
if (typeof screen === "string") {
2026-07-20 16:05:17 +00:00
screen = params.screen;
}
}
return screen;
};