// Metro module 15836 (f15837). import { useSharedValue, useAnimatedReaction } from "../../../../reanimated/ReanimatedRexport"; import useAnimatedKeyboardHeight from "../../../../keyboard/native/useAnimatedKeyboardHeight"; import useScreenNameSharedValue from "../../../../panels/morphable/native/useScreenNameSharedValue"; import * as _cheapWorkletShallowEqual from "../../../../reanimated/native/cheapWorkletShallowEqual"; import getPIPBottomOffsetForPIPMode from "../../../../panels/morphable/native/getPIPBottomOffsetForPIPMode"; import getAdjustedBottomOffsets from "../../../../panels/morphable/native/getAdjustedBottomOffsets"; import updateSharedValueIfChanged_native from "../../../../reanimated/utils/updateSharedValueIfChanged.native"; const __initData = { code: "function usePIPAvoidanceSpecsTsx1(){const{keyboardHeight,safeArea,screenName}=this.__closure;return{keyboardHeight:keyboardHeight.get(),safeAreaBottom:safeArea.bottom,screenName:screenName.get()};}" }; const __initData2 = { code: "function usePIPAvoidanceSpecsTsx2(props,previous){const{cheapWorkletShallowEqual,getPIPBottomOffsetForPIPMode,getAdjustedBottomOffsets,updateSharedValueIfChanged,pipAvoidanceSpecs}=this.__closure;if(cheapWorkletShallowEqual(props,previous!==null&&previous!==void 0?previous:undefined))return;const{keyboardHeight:keyboardHeight,safeAreaBottom:safeAreaBottom,screenName:screenName}=props;const screenBottomOffset=getPIPBottomOffsetForPIPMode(screenName);const{bottomOffset:bottomOffset}=getAdjustedBottomOffsets({screenBottomOffset:screenBottomOffset,safeAreaBottom:safeAreaBottom,keyboardHeight:keyboardHeight});updateSharedValueIfChanged(pipAvoidanceSpecs,{top:0,bottom:bottomOffset});}" }; export default function usePIPAvoidanceSpecs(a0) { let c22500_0 = a0; const sharedValue = useSharedValue({ top: 0, bottom: 0 }); const animatedKeyboardHeight = useAnimatedKeyboardHeight(); let c22500_2 = animatedKeyboardHeight; const screenNameSharedValue = useScreenNameSharedValue(); let c22500_3 = screenNameSharedValue; const n = () => ({ keyboardHeight: c22500_2.get(), safeAreaBottom: c22500_0.bottom, screenName: c22500_3.get() }); n.__closure = { keyboardHeight: animatedKeyboardHeight, safeArea: a0, screenName: screenNameSharedValue }; n.__workletHash = 9790941132204; n.__initData = __initData; const f = function f(a0, a1) { if (!_cheapWorkletShallowEqual.cheapWorkletShallowEqual(a0, a1 == null ? void 0 : a1)) { const { keyboardHeight, safeAreaBottom } = a0; updateSharedValueIfChanged_native(sharedValue, { top: 0, bottom: getAdjustedBottomOffsets({ screenBottomOffset: getPIPBottomOffsetForPIPMode(a0.screenName), safeAreaBottom, keyboardHeight }).bottomOffset }); } }; f.__closure = { cheapWorkletShallowEqual: _cheapWorkletShallowEqual.cheapWorkletShallowEqual, getPIPBottomOffsetForPIPMode, getAdjustedBottomOffsets, updateSharedValueIfChanged: updateSharedValueIfChanged_native, pipAvoidanceSpecs: sharedValue }; f.__workletHash = 643938425459; f.__initData = __initData2; useAnimatedReaction(n, f); return sharedValue; };