2026-07-20 16:05:17 +00:00
// Module ID: 1507
2026-07-25 08:10:48 +00:00
// Function ID: 17350
2026-07-20 16:05:17 +00:00
// Name: useFocusEffect
2026-07-23 10:11:24 +00:00
// Dependencies: [31, 1508]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 1507 (useFocusEffect)
2026-07-23 10:11:24 +00:00
import result from "result" ;
2026-07-20 16:05:17 +00:00
2026-07-21 22:01:30 +00:00
2026-07-23 10:11:24 +00:00
export default function useFocusEffect ( c5 ) {
const importDefault = c5 ;
let tmp = importDefault ( 1508 ) ( ) ;
2026-07-20 16:05:17 +00:00
const dependencyMap = tmp ;
if ( undefined !== arguments [ 1 ] ) {
const _console = console ;
console . error ( "You passed a second argument to 'useFocusEffect', but it only accepts one argument. If you want to pass a dependency array, you can use 'React.useCallback':\n\nuseFocusEffect(\n React.useCallback(() => {\n // Your code here\n }, [depA, depB])\n);\n\nSee usage guide: https://reactnavigation.org/docs/use-focus-effect" ) ;
}
2026-07-23 10:11:24 +00:00
const items = [ c5 , tmp ] ;
2026-07-20 16:05:17 +00:00
const effect = React . useEffect ( ( ) => {
let tmp = false ;
function callback ( ) {
const tmp = callback ( ) ;
return tmp ;
}
if ( tmp . isFocused ( ) ) {
let closure _0 = callback ( ) ;
tmp = true ;
}
let closure _3 = tmp . addListener ( "focus" , ( ) => {
2026-07-23 10:11:24 +00:00
if ( ! c1 ) {
2026-07-20 16:05:17 +00:00
if ( undefined !== callback ) {
callback ( ) ;
}
2026-07-23 10:11:24 +00:00
callback = callback ( ) ;
c1 = true ;
2026-07-20 16:05:17 +00:00
}
} ) ;
let closure _4 = tmp . addListener ( "blur" , ( ) => {
if ( undefined !== callback ) {
callback ( ) ;
}
2026-07-23 10:11:24 +00:00
callback = undefined ;
let c1 = false ;
2026-07-20 16:05:17 +00:00
} ) ;
return ( ) => {
if ( undefined !== callback ) {
callback ( ) ;
}
callback2 ( ) ;
callback3 ( ) ;
} ;
} , items ) ;
} ;