decord/source/1541_context.js

36 lines
1.4 KiB
JavaScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 1541
// Function ID: 1542
2026-08-06 08:05:19 +00:00
// Name: context
2026-08-15 05:55:55 +00:00
// Dependencies: [19, 21, 1542, 1544]
2026-08-06 08:05:19 +00:00
// Exports: NavigationProvider
2026-08-15 05:55:55 +00:00
// Module 1541 (context)
2026-08-24 06:08:38 +00:00
import context12 from "context1" /* 1542 */;
import NavigationContext from "NavigationContext" /* 1544 */;
import importAllResult from "noop" /* 19 */;
import { jsx } from "jsxProd" /* 21 */;
2026-08-06 08:05:19 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-08-06 08:05:19 +00:00
let context = importAllResult.createContext(undefined);
export const NavigationRouteContext = context;
export const NamedRouteContextListContext = importAllResult.createContext(undefined);
export const NavigationProvider = function NavigationProvider(route) {
route = route.route;
({ navigation, children } = route);
2026-08-24 06:08:38 +00:00
context = importAllResult.useContext(context12.IsFocusedContext);
2026-08-06 08:05:19 +00:00
let tmp5 = null != context;
2026-08-24 06:08:38 +00:00
const context1 = importAllResult.useContext(context12.FocusedRouteKeyContext);
2026-08-06 08:05:19 +00:00
if (tmp5) {
tmp5 = !context;
}
let tmp6 = !tmp5;
if (!tmp5) {
tmp6 = context1 === route.key;
}
let obj = { value: route, children: null };
2026-08-24 06:08:38 +00:00
obj = { value: navigation, children: jsx(tmp(1542).IsFocusedContext.Provider, { value: tmp6, children }) };
obj[1] = jsx(NavigationContext.NavigationContext.Provider, { value: navigation, children: jsx(tmp(1542).IsFocusedContext.Provider, { value: tmp6, children }) });
return <context.Provider value={navigation}>{jsx(tmp(1542).IsFocusedContext.Provider, { value: tmp6, children })}</context.Provider>;
2026-08-06 08:05:19 +00:00
};