Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
42 lines
1.3 KiB
JavaScript
42 lines
1.3 KiB
JavaScript
// Module ID: 1567
|
|
// Function ID: 1568
|
|
// Dependencies: [19, 1513]
|
|
// Exports: useFocusedListenersChildrenAdapter
|
|
|
|
// Module 1567
|
|
import NavigationBuilderContext from "NavigationBuilderContext" /* 1513 */;
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
require = arg1;
|
|
|
|
export const useFocusedListenersChildrenAdapter = function useFocusedListenersChildrenAdapter(navigation) {
|
|
navigation = navigation.navigation;
|
|
const focusedListeners = navigation.focusedListeners;
|
|
const addListener = noop.useContext(NavigationBuilderContext.NavigationBuilderContext).addListener;
|
|
const items = [focusedListeners, navigation];
|
|
const callback = noop.useCallback((fn) => {
|
|
if (navigation.isFocused()) {
|
|
for (const item10012 of focusedListeners) {
|
|
let item10012Result = item10012(arg0);
|
|
let handled = item10012Result.handled;
|
|
if (handled) {
|
|
let obj2 = { handled, result: tmp5 };
|
|
obj.return();
|
|
return obj2;
|
|
}
|
|
}
|
|
const obj3 = { handled: true, result: fn(navigation) };
|
|
return obj3;
|
|
} else {
|
|
return { handled: false, result: null };
|
|
}
|
|
}, items);
|
|
const items1 = [addListener, callback];
|
|
const effect = noop.useEffect(() => {
|
|
let tmpResult;
|
|
if (addListener != null) {
|
|
tmpResult = tmp("focus", callback);
|
|
}
|
|
return tmpResult;
|
|
}, items1);
|
|
};
|