// Metro module 5382 (f5383). import { useCallback, useMemo, useRef, memo } from "react"; import { useBottomSheetInternal, useBoundingClientRect } from "./Module5250"; import Module1606, { useAnimatedStyle } from "./Module1606"; import * as _Module5246 from "./Module5246"; import { styles } from "./Module5383"; const __initData = { code: "function pnpm_BottomSheetFooterTsx1(){const{animatedFooterPosition,animatedKeyboardState,KEYBOARD_STATE,bottomInset}=this.__closure;let footerTranslateY=animatedFooterPosition.get();if(animatedKeyboardState.get()!==KEYBOARD_STATE.SHOWN){footerTranslateY=footerTranslateY-bottomInset;}return{transform:[{translateY:Math.max(0,footerTranslateY)}]};}" }; const r25 = memo(function BottomSheetFooterComponent(props) { let animatedStyle; const { animatedFooterPosition, bottomInset = 0 } = props; let c14838_1 = bottomInset; const { style, children } = props; animatedStyle = void 0; const ref = useRef(null); const bottomSheetInternal = useBottomSheetInternal(); const { animatedFooterHeight, animatedKeyboardState } = bottomSheetInternal; const c = function c() { const r7 = animatedFooterPosition.get(); return { transform: [{ translateY: Math.max(0, animatedKeyboardState.get() !== _Module5246.KEYBOARD_STATE.SHOWN ? r7 - c14838_1 : r7) }] }; }; c.__closure = { animatedFooterPosition, animatedKeyboardState, KEYBOARD_STATE: _Module5246.KEYBOARD_STATE, bottomInset }; c.__workletHash = 5322275157644; c.__initData = __initData; animatedStyle = useAnimatedStyle(c, [bottomInset, animatedKeyboardState, animatedFooterPosition]); const memo = useMemo(() => [styles.container, style, animatedStyle], [style, animatedStyle]); const callback = useCallback((a0) => { animatedFooterHeight.set(a0.nativeEvent.layout.height); }, [animatedFooterHeight]); useBoundingClientRect(ref, useCallback((a0) => { animatedFooterHeight.set(a0.height); }, [animatedFooterHeight])); return children !== null ? {children} : null; }); r25.displayName = "BottomSheetFooter"; export { r25 as BottomSheetFooter };