// Metro module 15991 (f15992).
import * as Module19 from "react";
import { useMemo, useLayoutEffect, useRef, useContext, useEffect, useState, useCallback, useId } from "react";
import { View, StyleSheet } from "react-native";
import ChannelRTCStore from "../../../calls/ChannelRTCStore";
import { BORDER_RADIUS_PHYSICS, MODE_CHANGE_PHYSICS, PANEL_CONTROLS_HEIGHT_PHYSICS, UI_SHOW_HIDE_PHYSICS, VoicePanelModes } from "../../VoicePanelConstants";
import { CALL_TILE_GUTTER, EDGE_GUTTER } from "../card/VoicePanelCardConstants";
import { CONTROLS_DRAWER_HEADER_EXPANDED_SIZE, VoicePanelControlsModes } from "./VoicePanelControlsConstants";
import { ComponentActions, ThemeTypes } from "../../../../Constants";
import { createStyles } from "../../../../design/components/Styles/native/createStyles";
import Module712 from "../../../../_bundle/Module712";
import { isMetaQuest } from "../../../device/MetaQuestUtils.android";
import useDrawerToggle from "./useDrawerToggle";
import { ActionSheetDragHandle } from "../../../../design/components/experimental/native";
import VoicePanelStateContext from "../VoicePanelStateContext";
import * as _ReanimatedRexport from "../../../reanimated/ReanimatedRexport";
import { useAnimatedStyle, LayoutAnimationConfig, useSharedValue, useAnimatedProps, useAnimatedReaction } from "../../../reanimated/ReanimatedRexport";
import { createUseAnimatedScrollLock, ControlsGestureScrollLock } from "./utils/createUseAnimatedScrollLock";
import useControlsLock from "./useControlsLock";
import { useToken } from "../../../../design/tokens/native/useToken";
import * as _Module5273 from "../../../../_bundle/Module5273";
import { Gesture, GestureDetector } from "../../../../_bundle/Module5273";
import * as _trackVoicePanelTabOpened from "./trackVoicePanelTabOpened";
import trackVoicePanelTabOpened from "./trackVoicePanelTabOpened";
import calculateVoicePanelHeaderSpecs from "../header/calculateVoicePanelHeaderSpecs";
import * as _VoicePanelControlsUtils from "../utils/VoicePanelControlsUtils";
import * as _HapticUtils_native from "../../../haptics/HapticUtils.native";
import { useIsScreenReaderEnabled } from "../../../a11y/native/useIsScreenReaderEnabled.native";
import useWindowDimensionsSharedValue_native from "../../../screen/useWindowDimensionsSharedValue.native";
import * as _cheapWorkletShallowEqual from "../../../reanimated/native/cheapWorkletShallowEqual";
import * as _VoicePanelControlUtils from "./utils/VoicePanelControlUtils";
import { useShouldShowFloatingCTA } from "./utils/VoicePanelFloatingCTAUtils";
import useConsoleConnectingInfo from "../hooks/useConsoleConnectingInfo";
import { TransitionItem } from "../../../../design/components/TransitionGroup/TransitionGroup";
import { renderVoicePanelFloatingCTA } from "./VoicePanelFloatingCTAContainer";
import { renderVoicePanelConsoleStatus } from "./VoicePanelConsoleStatus";
import useRefValue from "../../../../hooks/useRefValue";
import useControlsButtons from "./useControlsButtons";
import * as _spring from "../../../../design/animation/reanimated/spring/spring";
import ReanimatedNativeView from "../../../core/native/ReanimatedNativeView";
import MobileVisualRefreshExperiment from "../../../themes/experiments/MobileVisualRefreshExperiment";
import useIsConnectedToVoiceChannel from "../hooks/useIsConnectedToVoiceChannel";
import { useMaybeFetchSoundboardSounds } from "../../../soundboard/native/SoundboardHooks";
import { batchUpdates } from "../../../../_bundle/Module705";
import useControlAccessoryHeight from "../hooks/useControlAccessoryHeight";
import { ComponentDispatch } from "../../../../utils/ComponentDispatchUtils";
import { getSafeAreaInsets } from "../../../safe_area/useSafeAreaInsets.native";
import { getWindowDimensions } from "../../../screen/useWindowDimensions.native";
import roundToNearestPixel from "../utils/roundToNearestPixel";
import VoicePanelControlsDimOverlay from "./VoicePanelControlsDimOverlay";
import VoicePanelAccessibilityView from "../VoicePanelAccessibilityView";
import { ThemeContextProvider } from "../../../../_bundle/Module3901";
import { VoicePanelVisualEffectView } from "../shared/VoicePanelVisualEffectView";
import { isAndroid } from "../../../../utils/PlatformUtils";
import VoicePanelControlsDrawer from "./VoicePanelControlsDrawer";
let __initData, __initData2, __initData3, __initData4, __initData5, __initData6, __initData7, __initData8, __initData9, __initData10, __initData11, Component, __initData12, VoicePanelButtonsInner, __initData13, __initData14, __initData15, __initData16, __initData17, __initData18;
const useStyles = createStyles({
accessibilityWrapper: {
...StyleSheet.absoluteFillObject,
zIndex: 1
},
wrapper: {
position: "absolute",
bottom: 0,
left: "50%",
overflow: "hidden",
display: "flex",
alignItems: "center",
justifyContent: "center",
borderRadius: Module712.modules.mobile.VOICE_PANEL_CONTROLS_BORDER_RADIUS
},
buttonsWrapper: {
position: "absolute",
left: 0,
right: 0,
zIndex: 20,
flexDirection: "row",
justifyContent: "space-between",
alignItems: "center",
marginHorizontal: Module712.space.PX_16
},
actionSheetDragHandleWrapper: {
position: "absolute",
top: 0,
left: 0,
right: 0,
zIndex: 21
}
});
const TRANSITIONAL_HEIGHT = 200;
const interFloatingTransitionHeight = 200;
const SCROLL_BEGIN_GRACE_TICKS = isMetaQuest() ? 15 : 5;
let Component2 = Module19.memo(function({ openTab: openTab2 }) {
const styles = useStyles();
const drawerToggle = useDrawerToggle(openTab2);
return
;
});
__initData = {
code: "function VoicePanelControlsTsx1(){const{scrollLock,isDragScrolling,runOnJS,gestureLock}=this.__closure;scrollLock.set(false);isDragScrolling.set(false);runOnJS(gestureLock.unlock)();}"
};
__initData2 = {
code: "function VoicePanelControlsTsx2({velocityY:velocityY}){const{wrapperSpecs,wrapperDimensions,calculateVoicePanelHeaderSpecs,safeArea,edgeGutter,controlsSpecs,VoicePanelControlsModes,gestureSpecs,scrollLock,isDragScrolling,runOnJS,gestureLock}=this.__closure;const absoluteVelocity=Math.abs(velocityY);let resultingControlMode;if(absoluteVelocity>200&&velocityY<0){wrapperSpecs.set({...wrapperSpecs.get(),height:wrapperDimensions.get().drawerHeight-calculateVoicePanelHeaderSpecs(safeArea.get(),edgeGutter).height});if(controlsSpecs.get().mode===VoicePanelControlsModes.DRAWER){resultingControlMode=VoicePanelControlsModes.RESET;}else{resultingControlMode=VoicePanelControlsModes.DRAWER;}}else if(absoluteVelocity<200&&gestureSpecs.get().isDrawer){if(controlsSpecs.get().mode===VoicePanelControlsModes.DRAWER){resultingControlMode=VoicePanelControlsModes.RESET;}else{resultingControlMode=VoicePanelControlsModes.DRAWER;}}else{if(controlsSpecs.get().mode===VoicePanelControlsModes.FLOATING_DEFAULT){resultingControlMode=VoicePanelControlsModes.RESET;}else{resultingControlMode=VoicePanelControlsModes.FLOATING_DEFAULT;}}scrollLock.set(false);isDragScrolling.set(false);runOnJS(gestureLock.unlock)(resultingControlMode);}"
};
__initData3 = {
code: "function VoicePanelControlsTsx3(){const{scrollLock,isDragScrolling,gestureSpecs,runOnJS,gestureLock}=this.__closure;console.log('ZZZZZ - ControlsGesture.onTouchesCancelled');scrollLock.set(false);isDragScrolling.set(false);gestureSpecs.set({...gestureSpecs.get(),active:false});runOnJS(gestureLock.unlock)();}"
};
__initData4 = {
code: "function VoicePanelControlsTsx4(event){const{gestureSpecs,calculateVoicePanelHeaderSpecs,safeArea,edgeGutter,wrapperSpecs,getControlsDrawerOpenWidth,windowDimensions,wrapperDimensions,controlsSpecs,runOnJS,triggerHapticFeedback,HapticFeedbackTypes,getControlsDefaultWidth}=this.__closure;const change=event.absoluteY-gestureSpecs.get().absoluteY;const newHeight=gestureSpecs.get().height-gestureSpecs.get().y-change;if(newHeight>gestureSpecs.get().drawerTransitionHeight){if(!gestureSpecs.get().isDrawer){gestureSpecs.set({...gestureSpecs.get(),isDrawer:true});}const headerHeight=calculateVoicePanelHeaderSpecs(safeArea.get(),edgeGutter).height;wrapperSpecs.set({...wrapperSpecs.get(),x:0,y:0,width:getControlsDrawerOpenWidth(windowDimensions.get().width,safeArea.get().left,safeArea.get().right),height:Math.min(newHeight,wrapperDimensions.get().drawerHeight-headerHeight),drawerMode:true});}else{const progress=newHeight/gestureSpecs.get().drawerTransitionHeight;const floatingHeight=controlsSpecs.get().height;const yOffset=Math.max(newHeight-safeArea.get().bottom-floatingHeight,0)*-1;const newChange=yOffset*(1-progress/1.5);if(gestureSpecs.get().isDrawer){gestureSpecs.set({...gestureSpecs.get(),isDrawer:false});}if(floatingHeight!==wrapperSpecs.get().height&&!wrapperSpecs.get().drawerMode){runOnJS(triggerHapticFeedback)(HapticFeedbackTypes.IMPACT_MEDIUM);}wrapperSpecs.set({...wrapperSpecs.get(),x:0,y:safeArea.get().bottom*-1+newChange,width:getControlsDefaultWidth(windowDimensions.get().width,safeArea.get().left,safeArea.get().right),height:floatingHeight,drawerMode:false});}}"
};
__initData5 = {
code: "function VoicePanelControlsTsx5(event,manager){const{State,gestureSpecs,controlsSpecs,VoicePanelControlsModes,touchMoveCount,SCROLL_BEGIN_GRACE_TICKS,isDragScrolling,sharedTab,scrollOffsetValue,GESTURE_VERTICAL_MINIMUM,wrapperSpecs,TRANSITIONAL_HEIGHT,INTER_FLOATING_TRANSITIONAL_HEIGHT,tab,runOnJS,openTab,VoicePanelTabAnalyticsSources,scrollLock}=this.__closure;if(event.state!==State.BEGAN||gestureSpecs.get().active)return;if(controlsSpecs.get().mode===VoicePanelControlsModes.HIDDEN){manager.fail();return;}touchMoveCount.set(touchMoveCount.get()+1);const isDragging=touchMoveCount.get()<=SCROLL_BEGIN_GRACE_TICKS?true:isDragScrolling.get();const scrollOffset=function(){switch(sharedTab.get()){case'settings':case'app_launcher':return scrollOffsetValue.get();default:return 0;}}();const{absoluteY:absoluteY,absoluteX:absoluteX}=event.changedTouches[0];const computed=gestureSpecs.get().absoluteY-absoluteY;if(controlsSpecs.get().mode===VoicePanelControlsModes.DRAWER&&isDragging&&(computed>=0||scrollOffset>0)){return;}if(controlsSpecs.get().mode===VoicePanelControlsModes.FLOATING_DEFAULT&&computed>GESTURE_VERTICAL_MINIMUM||controlsSpecs.get().mode===VoicePanelControlsModes.DRAWER&&(computed<-GESTURE_VERTICAL_MINIMUM||computed>GESTURE_VERTICAL_MINIMUM)){gestureSpecs.set({absoluteX:absoluteX,absoluteY:absoluteY,x:wrapperSpecs.get().x,y:wrapperSpecs.get().y,height:wrapperSpecs.get().height,isDrawer:controlsSpecs.get().mode===VoicePanelControlsModes.DRAWER,active:true,drawerTransitionHeight:TRANSITIONAL_HEIGHT,interFloatingTransitionHeight:INTER_FLOATING_TRANSITIONAL_HEIGHT});if(controlsSpecs.get().mode!==VoicePanelControlsModes.DRAWER&&tab!=='settings'){runOnJS(openTab)({tab:'settings',source:VoicePanelTabAnalyticsSources.GESTURE,disableControlsUpdate:true});}scrollLock.set(true);manager.activate();}else if(Math.abs(computed)>Math.abs(GESTURE_VERTICAL_MINIMUM)){manager.fail();}}"
};
__initData6 = {
code: "function VoicePanelControlsTsx6(){const{runOnJS,gestureLock}=this.__closure;runOnJS(gestureLock.lock)();}"
};
__initData7 = {
code: "function VoicePanelControlsTsx7(event){const{touchMoveCount,gestureSpecs,wrapperSpecs,controlsSpecs,VoicePanelControlsModes,TRANSITIONAL_HEIGHT,INTER_FLOATING_TRANSITIONAL_HEIGHT}=this.__closure;touchMoveCount.set(0);gestureSpecs.set({absoluteX:event.changedTouches[0].absoluteX,absoluteY:event.changedTouches[0].absoluteY,x:wrapperSpecs.get().x,y:wrapperSpecs.get().y,height:wrapperSpecs.get().height,isDrawer:controlsSpecs.get().mode===VoicePanelControlsModes.DRAWER,active:false,drawerTransitionHeight:TRANSITIONAL_HEIGHT,interFloatingTransitionHeight:INTER_FLOATING_TRANSITIONAL_HEIGHT});}"
};
__initData8 = {
code: "function VoicePanelControlsTsx8(){const{wrapperSpecs}=this.__closure;return wrapperSpecs.get().drawerMode;}"
};
__initData9 = {
code: "function VoicePanelControlsTsx9(current,previous){const{runOnJS,triggerHapticFeedback,HapticFeedbackTypes}=this.__closure;if(current===previous)return;runOnJS(triggerHapticFeedback)(HapticFeedbackTypes.IMPACT_MEDIUM);}"
};
__initData10 = {
code: "function VoicePanelControlsTsx10(){const{connected,controlsSpecs,mode,windowDimensions,windowDimensionsIgnoringKeyboard,safeArea}=this.__closure;return{connected:connected.get(),currentControlsMode:controlsSpecs.get().mode,mode:mode.get(),windowWidth:windowDimensions.get().width,windowHeight:windowDimensions.get().height,windowHeightIgnoringKeyboard:windowDimensionsIgnoringKeyboard.get().height,controlsHeightValue:controlsSpecs.get().height,safeArea:safeArea.get()};}"
};
__initData11 = {
code: "function VoicePanelControlsTsx11(props,previous){const{cheapWorkletShallowEqual,VoicePanelModes,wrapperSpecs,VoicePanelControlsModes,runOnJS,setControlsMode,isScreenReaderEnabled,EDGE_GUTTER,getControlsDefaultWidth,getDrawerSpec,getControlsDrawerOpenWidth}=this.__closure;var _previous$currentCont;if(cheapWorkletShallowEqual(props,previous!==null&&previous!==void 0?previous:undefined))return;const{currentControlsMode:currentControlsMode,mode:mode,windowWidth:windowWidth,windowHeightIgnoringKeyboard:windowHeightIgnoringKeyboard,controlsHeightValue:controlsHeightValue,safeArea:safeArea}=props;switch(mode){case VoicePanelModes.DISMISSED:case VoicePanelModes.PIP:if(!wrapperSpecs.get().hidden){wrapperSpecs.set({...wrapperSpecs.get(),hidden:true});}return;case VoicePanelModes.PANEL:default:break;}switch(currentControlsMode){case VoicePanelControlsModes.RESET:runOnJS(setControlsMode)({mode:(_previous$currentCont=previous===null||previous===void 0?void 0:previous.currentControlsMode)!==null&&_previous$currentCont!==void 0?_previous$currentCont:VoicePanelControlsModes.FLOATING_DEFAULT});return;case VoicePanelControlsModes.HIDDEN:if(isScreenReaderEnabled){wrapperSpecs.set({...wrapperSpecs.get(),hidden:false});break;}if(!wrapperSpecs.get().hidden){wrapperSpecs.set({...wrapperSpecs.get(),hidden:true});}break;case VoicePanelControlsModes.FLOATING_DEFAULT:wrapperSpecs.set({x:0,y:Math.max(safeArea.bottom,EDGE_GUTTER)*-1,width:getControlsDefaultWidth(windowWidth,safeArea.left,safeArea.right),height:controlsHeightValue,drawerMode:false,hidden:false});break;case VoicePanelControlsModes.DRAWER:const{minHeight:minHeight,maxHeight:maxHeight}=getDrawerSpec(windowHeightIgnoringKeyboard,safeArea.top);const heightMidpoint=(maxHeight+minHeight)/2;let height;if(wrapperSpecs.get().height<=controlsHeightValue){height=maxHeight;}else if(previous!=null&&wrapperSpecs.get().height===getDrawerSpec(previous.windowHeight,previous.safeArea.top).maxHeight){height=maxHeight;}else if(wrapperSpecs.get().height>=heightMidpoint){height=maxHeight;}else{height=minHeight;}wrapperSpecs.set({x:0,y:0,width:getControlsDrawerOpenWidth(windowWidth,safeArea.left,safeArea.right),height:height,drawerMode:true,hidden:false});break;}}"
};
Component = Module19.memo(function({ channelId: channelId2, wrapperSpecs, controlsSpecs, accessoryHeights, gestureState }) {
const shouldShowFloatingCTA = useShouldShowFloatingCTA(channelId2);
const controlsLock = useControlsLock();
let c22699_4 = controlsLock;
const consoleConnectingInfo = useConsoleConnectingInfo(channelId2);
const { isConnectingToConsole, isConnectingOrConnectedToConsole } = consoleConnectingInfo;
const memo = useMemo(() => ({
wrapperSpecs,
controlsSpecs,
accessoryHeights,
gestureState
}), [wrapperSpecs, controlsSpecs, accessoryHeights, gestureState]);
useLayoutEffect(() => {
if (isConnectingToConsole) {
c22699_4.lock();
} else {
c22699_4.unlock();
}
}, [isConnectingToConsole, controlsLock]);
return <>
{[, ]}
>;
});
__initData12 = {
code: "function VoicePanelControlsTsx12(){const{controlsSpecs,connected,sharedTab,wrapperSpecs,TRANSITIONAL_HEIGHT,CONTROLS_DRAWER_HEADER_EXPANDED_SIZE,withSpring,MODE_CHANGE_PHYSICS}=this.__closure;const showPushToTalkText=controlsSpecs.get().pushToTalk&&connected.get();const height=sharedTab.get()==='settings'&&wrapperSpecs.get().height>=TRANSITIONAL_HEIGHT?CONTROLS_DRAWER_HEADER_EXPANDED_SIZE:controlsSpecs.get().height;const translateY=function(){return sharedTab.get()!=='settings'&&wrapperSpecs.get().height>=TRANSITIONAL_HEIGHT?-controlsSpecs.get().height:0;}();return{top:showPushToTalkText?-4:0,height:withSpring(height,MODE_CHANGE_PHYSICS),opacity:withSpring(sharedTab.get()!=='settings'&&wrapperSpecs.get().height>=TRANSITIONAL_HEIGHT?0:1,MODE_CHANGE_PHYSICS),transform:[{translateY:withSpring(translateY,MODE_CHANGE_PHYSICS)},{scale:withSpring(sharedTab.get()!=='settings'&&wrapperSpecs.get().height>=TRANSITIONAL_HEIGHT?0.95:1,MODE_CHANGE_PHYSICS)}]};}"
};
VoicePanelButtonsInner = Module19.memo(function VoicePanelButtonsInner(props) {
const { openTab, wrapperSpecs: wrapperSpecs2, sharedTab } = props;
const ref = useRef(true);
const refValue = useRefValue(ref);
const styles = useStyles();
const context = useContext(VoicePanelStateContext);
const { controlsSpecs: controlsSpecs2, connected } = context;
const controlsButtons = useControlsButtons();
const c = function c() {
const r19 = controlsSpecs2.get().pushToTalk && connected.get();
const r15 = sharedTab.get() === "settings" && wrapperSpecs2.get().height >= TRANSITIONAL_HEIGHT ? CONTROLS_DRAWER_HEADER_EXPANDED_SIZE : controlsSpecs2.get().height;
const r16 = sharedTab.get() !== "settings" ? wrapperSpecs2.get().height >= TRANSITIONAL_HEIGHT ? -controlsSpecs2.get().height : 0 : 0;
return {
top: r19 ? -4 : 0,
height: _spring.withSpring(r15, MODE_CHANGE_PHYSICS),
opacity: _spring.withSpring(sharedTab.get() !== "settings" ? wrapperSpecs2.get().height >= TRANSITIONAL_HEIGHT ? 0 : 1 : 1, MODE_CHANGE_PHYSICS),
transform: [{
translateY: _spring.withSpring(r16, MODE_CHANGE_PHYSICS)
}, {
scale: _spring.withSpring(sharedTab.get() !== "settings" ? wrapperSpecs2.get().height >= TRANSITIONAL_HEIGHT ? 0.95 : 1 : 1, MODE_CHANGE_PHYSICS)
}]
};
};
c.__closure = {
controlsSpecs: controlsSpecs2,
connected,
sharedTab,
wrapperSpecs: wrapperSpecs2,
TRANSITIONAL_HEIGHT,
CONTROLS_DRAWER_HEADER_EXPANDED_SIZE,
withSpring: _spring.withSpring,
MODE_CHANGE_PHYSICS
};
c.__workletHash = 17578996123721;
c.__initData = __initData12;
const animatedStyle = useAnimatedStyle(c);
useEffect(() => {
ref.current = false;
}, []);
return
{controlsButtons.map((controlsButton) => controlsButton.render(controlsButton.key, {
props: controlsButton,
openTab,
wrapperSpecs: wrapperSpecs2
}))}
;
});
__initData13 = {
code: "function VoicePanelControlsTsx13(){const{withSpring,wrapperSpecs,borderRadius,BORDER_RADIUS_PHYSICS,PANEL_CONTROLS_HEIGHT_PHYSICS,MODE_CHANGE_PHYSICS,roundToNearestPixel,UI_SHOW_HIDE_PHYSICS,useReducedMotion,gestureState,CALL_TILE_GUTTER,accessoryHeights}=this.__closure;return{borderBottomRightRadius:withSpring(!wrapperSpecs.get().drawerMode?borderRadius:0,BORDER_RADIUS_PHYSICS),borderBottomLeftRadius:withSpring(!wrapperSpecs.get().drawerMode?borderRadius:0,BORDER_RADIUS_PHYSICS),height:withSpring(wrapperSpecs.get().height,PANEL_CONTROLS_HEIGHT_PHYSICS),width:withSpring(wrapperSpecs.get().width,MODE_CHANGE_PHYSICS),marginLeft:withSpring(roundToNearestPixel(wrapperSpecs.get().width/2)*-1,MODE_CHANGE_PHYSICS),opacity:withSpring(wrapperSpecs.get().hidden?0:1,MODE_CHANGE_PHYSICS),transform:[{translateX:withSpring(wrapperSpecs.get().x,UI_SHOW_HIDE_PHYSICS)},{translateY:withSpring(!useReducedMotion.get()&&(wrapperSpecs.get().hidden||gestureState.get().active&&!gestureState.get().requiresPop)?wrapperSpecs.get().height+CALL_TILE_GUTTER+accessoryHeights.get():wrapperSpecs.get().y,UI_SHOW_HIDE_PHYSICS)}]};}"
};
__initData14 = {
code: "function VoicePanelControlsTsx14(){const{mode,VoicePanelModes,wrapperSpecs}=this.__closure;return{pointerEvents:mode.get()!==VoicePanelModes.PANEL||wrapperSpecs.get().hidden?'none':'auto'};}"
};
__initData15 = {
code: "function VoicePanelControlsTsx15(){const{controlsSpecs}=this.__closure;return controlsSpecs.get().mode;}"
};
__initData16 = {
code: "function VoicePanelControlsTsx16(mode,previousMode){const{isScreenReaderEnabled,VoicePanelControlsModes,runOnJS,setIsDrawer}=this.__closure;if(mode===previousMode||!isScreenReaderEnabled)return;if(mode===VoicePanelControlsModes.DRAWER&&previousMode!==VoicePanelControlsModes.DRAWER){runOnJS(setIsDrawer)(true);}else if(mode!==VoicePanelControlsModes.DRAWER&&previousMode===VoicePanelControlsModes.DRAWER){runOnJS(setIsDrawer)(false);}}"
};
__initData17 = {
code: "function VoicePanelControlsTsx17(){const{wrapperSpecs}=this.__closure;return wrapperSpecs.get().drawerMode;}"
};
__initData18 = {
code: "function VoicePanelControlsTsx18(drawerMode,previousDrawerMode){const{isRefreshEnabled,runOnJS,setIsDrawerActive}=this.__closure;if(drawerMode===previousDrawerMode)return;if(!isRefreshEnabled)return;if(drawerMode){runOnJS(setIsDrawerActive)(true);}else{runOnJS(setIsDrawerActive)(false);}}"
};
const r106 = Module19.memo(function VoicePanelControls(props) {
let callback, c22701_12, sharedValue2, token, setState2, setState3;
let state2, sharedValue3, sharedValue4, callback2, controlsSpecs4, windowDimensions, wrapperDimensions, safeArea, sharedValue5, sharedValue6, sharedValue7, sharedValue8, ref2, sharedValue9, gestureLock, token2;
let sharedValue10, isScreenReaderEnabled2, c22703_2, controlsSpecs5, windowDimensions2, mode2, setControlsMode2, safeArea2, connected2;
const gestureState2 = props.gestureState;
callback = void 0;
c22701_12 = void 0;
sharedValue2 = void 0;
token = void 0;
setState2 = void 0;
setState3 = void 0;
const isScreenReaderEnabled = useIsScreenReaderEnabled();
const isRefreshEnabled = MobileVisualRefreshExperiment("VoicePanelControls");
let c22701_2 = isRefreshEnabled;
const context = useContext(VoicePanelStateContext);
const { channelId, controlsSpecs: controlsSpecs3, mode, setControlsMode, useReducedMotion } = context;
const styles = useStyles();
const [state, setState] = useState(null);
const sharedValue = useSharedValue(state);
useLayoutEffect(() => {
sharedValue.set(state);
});
const isConnectedToVoiceChannel = useIsConnectedToVoiceChannel(channelId);
useMaybeFetchSoundboardSounds({
shouldFetch: isConnectedToVoiceChannel
});
callback = useCallback((a0) => {
const { tab, source, disableControlsUpdate = false } = a0;
let c28201_2 = disableControlsUpdate;
const controlsProps = a0.controlsProps;
batchUpdates(() => {
let c30941_0 = false;
const mode3 = controlsSpecs3.get().mode;
const DRAWER = VoicePanelControlsModes.DRAWER;
setState((prevState) => {
c30941_0 = prevState !== tab;
return tab;
});
if (!c28201_2) {
setControlsMode({
mode: VoicePanelControlsModes.DRAWER,
...controlsProps
});
}
if (c30941_0 || mode3 !== DRAWER) {
trackVoicePanelTabOpened(channelId, tab, source);
}
});
}, [channelId, controlsSpecs3, setControlsMode]);
const controlAccessoryHeight = useControlAccessoryHeight();
c22701_12 = controlAccessoryHeight;
useLayoutEffect(() => {
let chatOpen;
const handleStoreChange2 = function handleStoreChange() {
const chatOpen2 = ChannelRTCStore.getChatOpen(channelId);
if (chatOpen2 !== chatOpen) {
chatOpen = chatOpen2;
if (chatOpen2) {
callback({
tab: "chat",
source: _trackVoicePanelTabOpened.VoicePanelTabAnalyticsSources.STORE,
controlsProps: {
debounce: true
}
});
}
}
};
const chatOpen2 = ChannelRTCStore.getChatOpen(channelId);
if (chatOpen2 !== chatOpen) {
chatOpen = chatOpen2;
if (chatOpen2) {
callback({
tab: "chat",
source: _trackVoicePanelTabOpened.VoicePanelTabAnalyticsSources.STORE,
controlsProps: {
debounce: true
}
});
}
}
ChannelRTCStore.addChangeListener(handleStoreChange2);
return () => {
ChannelRTCStore.removeChangeListener(handleStoreChange2);
};
}, [channelId, controlsSpecs3, callback, state]);
useEffect(() => {
const handleOpenChatTab2 = function handleOpenChatTab() {
callback({
tab: "chat",
source: _trackVoicePanelTabOpened.VoicePanelTabAnalyticsSources.HEADER_BUTTON
});
};
ComponentDispatch.subscribe(ComponentActions.VOICE_PANEL_OPEN_CHAT_TAB, handleOpenChatTab2);
return () => {
ComponentDispatch.unsubscribe(ComponentActions.VOICE_PANEL_OPEN_CHAT_TAB, handleOpenChatTab2);
};
}, [callback]);
const safeAreaInsets = getSafeAreaInsets();
sharedValue2 = useSharedValue({
width: _VoicePanelControlsUtils.getControlsDefaultWidth(getWindowDimensions().width, safeAreaInsets.left, safeAreaInsets.right),
height: 0,
x: 0,
y: 0,
drawerMode: false,
hidden: false
});
token = useToken(Module712.modules.mobile.VOICE_PANEL_CONTROLS_BORDER_RADIUS);
const ge = () => {
let r98, transform;
const r18 = {
borderBottomRightRadius: _spring.withSpring(sharedValue2.get().drawerMode ? 0 : token, BORDER_RADIUS_PHYSICS),
borderBottomLeftRadius: _spring.withSpring(sharedValue2.get().drawerMode ? 0 : token, BORDER_RADIUS_PHYSICS),
height: _spring.withSpring(sharedValue2.get().height, PANEL_CONTROLS_HEIGHT_PHYSICS),
width: _spring.withSpring(sharedValue2.get().width, MODE_CHANGE_PHYSICS),
marginLeft: _spring.withSpring(-1 * roundToNearestPixel(sharedValue2.get().width / 2), MODE_CHANGE_PHYSICS),
opacity: null,
transform: null
};
const r62 = sharedValue2.get().hidden ? 0 : 1;
L12: {
L11: {
r18.opacity = _spring.withSpring(r62, MODE_CHANGE_PHYSICS);
transform = [{
translateX: _spring.withSpring(sharedValue2.get().x, UI_SHOW_HIDE_PHYSICS)
}, ,];
if (!useReducedMotion.get()) {
if (!sharedValue2.get().hidden) {
if (!gestureState2.get().active) {
break L11;
}
if (gestureState2.get().requiresPop) {
break L11;
}
}
r98 = sharedValue2.get().height + CALL_TILE_GUTTER + c22701_12.get();
break L12;
}
}
r98 = sharedValue2.get().y;
}
transform[1] = {
translateY: _spring.withSpring(r98, UI_SHOW_HIDE_PHYSICS)
};
r18.transform = transform;
return r18;
};
ge.__closure = {
withSpring: _spring.withSpring,
wrapperSpecs: sharedValue2,
borderRadius: token,
BORDER_RADIUS_PHYSICS,
PANEL_CONTROLS_HEIGHT_PHYSICS,
MODE_CHANGE_PHYSICS,
roundToNearestPixel,
UI_SHOW_HIDE_PHYSICS,
useReducedMotion,
gestureState: gestureState2,
CALL_TILE_GUTTER,
accessoryHeights: controlAccessoryHeight
};
ge.__workletHash = 14734014706335;
ge.__initData = __initData13;
const animatedStyle = useAnimatedStyle(ge);
const de = () => ({
pointerEvents: mode.get() === VoicePanelModes.PANEL ? sharedValue2.get().hidden ? "none" : "auto" : "none"
});
de.__closure = {
mode,
VoicePanelModes,
wrapperSpecs: sharedValue2
};
de.__workletHash = 5608048435620;
de.__initData = __initData14;
const animatedProps = useAnimatedProps(de);
state2 = state;
sharedValue3 = sharedValue;
sharedValue4 = sharedValue2;
callback2 = callback;
controlsSpecs4 = void 0;
windowDimensions = void 0;
wrapperDimensions = void 0;
safeArea = void 0;
sharedValue5 = void 0;
sharedValue6 = void 0;
sharedValue7 = void 0;
sharedValue8 = void 0;
ref2 = void 0;
sharedValue9 = void 0;
gestureLock = void 0;
token2 = void 0;
const context2 = useContext(VoicePanelStateContext);
controlsSpecs4 = context2.controlsSpecs;
windowDimensions = context2.windowDimensions;
wrapperDimensions = context2.wrapperDimensions;
safeArea = context2.safeArea;
sharedValue5 = useSharedValue({
absoluteX: 0,
absoluteY: 0,
x: 0,
y: 0,
height: 0,
isDrawer: false,
active: false,
drawerTransitionHeight: TRANSITIONAL_HEIGHT,
interFloatingTransitionHeight
});
sharedValue6 = useSharedValue(0);
sharedValue7 = useSharedValue(false);
sharedValue8 = useSharedValue(0);
ref2 = useRef(void 0);
sharedValue9 = useSharedValue(false);
const [value] = useState(() => createUseAnimatedScrollLock(ref2, sharedValue9, sharedValue8, sharedValue7));
gestureLock = useControlsLock();
token2 = useToken(Module712.modules.mobile.VOICE_PANEL_GUTTER);
const memo = useMemo(() => {
const r36 = Gesture.Pan().manualActivation(true).maxPointers(1).shouldCancelWhenOutside(false).withRef(ref2);
const b = function b(a0) {
sharedValue6.set(0);
sharedValue5.set({
absoluteX: a0.changedTouches[0].absoluteX,
absoluteY: a0.changedTouches[0].absoluteY,
x: sharedValue4.get().x,
y: sharedValue4.get().y,
height: sharedValue4.get().height,
isDrawer: controlsSpecs4.get().mode === VoicePanelControlsModes.DRAWER,
active: false,
drawerTransitionHeight: TRANSITIONAL_HEIGHT,
interFloatingTransitionHeight
});
};
b.__closure = {
touchMoveCount: sharedValue6,
gestureSpecs: sharedValue5,
wrapperSpecs: sharedValue4,
controlsSpecs: controlsSpecs4,
VoicePanelControlsModes,
TRANSITIONAL_HEIGHT,
INTER_FLOATING_TRANSITIONAL_HEIGHT: interFloatingTransitionHeight
};
b.__workletHash = 3524850376026;
b.__initData = __initData7;
const r42 = r36.onTouchesDown(b);
const R = function R() {
_ReanimatedRexport.runOnJS(gestureLock.lock)();
};
R.__closure = {
runOnJS: _ReanimatedRexport.runOnJS,
gestureLock
};
R.__workletHash = 11720944776433;
R.__initData = __initData6;
const r51 = r42.onStart(R);
const h = function h(a0, a1) {
L28: {
if (a0.state === _Module5273.State.BEGAN && !sharedValue5.get().active) {
if (controlsSpecs4.get().mode !== VoicePanelControlsModes.HIDDEN) {
sharedValue6.set(sharedValue6.get() + 1);
const r17 = sharedValue6.get() <= SCROLL_BEGIN_GRACE_TICKS || sharedValue7.get();
const r16 = sharedValue3.get();
const r45 = r16 !== "settings" ? r16 === "app_launcher" ? sharedValue8.get() : 0 : sharedValue8.get();
const r49 = a0.changedTouches[0];
const { absoluteY, absoluteX } = r49;
const r18 = sharedValue5.get().absoluteY - absoluteY;
if (!(controlsSpecs4.get().mode === VoicePanelControlsModes.DRAWER && r17 && (r18 >= 0 || r45 > 0))) {
L23: {
if (!(controlsSpecs4.get().mode === VoicePanelControlsModes.FLOATING_DEFAULT && r18 > 30)) {
if (controlsSpecs4.get().mode === VoicePanelControlsModes.DRAWER) {
if (r18 < -30) {
break L23;
}
if (r18 > 30) {
break L23;
}
}
if (!(Math.abs(r18) > Math.abs(30))) {
break L28;
}
a1.fail();
break L28;
}
}
sharedValue5.set({
absoluteX,
absoluteY,
x: sharedValue4.get().x,
y: sharedValue4.get().y,
height: sharedValue4.get().height,
isDrawer: controlsSpecs4.get().mode === VoicePanelControlsModes.DRAWER,
active: true,
drawerTransitionHeight: TRANSITIONAL_HEIGHT,
interFloatingTransitionHeight
});
if (controlsSpecs4.get().mode !== VoicePanelControlsModes.DRAWER && state2 !== "settings") {
_ReanimatedRexport.runOnJS(callback2)({
tab: "settings",
source: _trackVoicePanelTabOpened.VoicePanelTabAnalyticsSources.GESTURE,
disableControlsUpdate: true
});
}
sharedValue9.set(true);
a1.activate();
}
} else {
a1.fail();
}
}
}
};
h.__closure = {
State: _Module5273.State,
gestureSpecs: sharedValue5,
controlsSpecs: controlsSpecs4,
VoicePanelControlsModes,
touchMoveCount: sharedValue6,
SCROLL_BEGIN_GRACE_TICKS,
isDragScrolling: sharedValue7,
sharedTab: sharedValue3,
scrollOffsetValue: sharedValue8,
GESTURE_VERTICAL_MINIMUM: 30,
wrapperSpecs: sharedValue4,
TRANSITIONAL_HEIGHT,
INTER_FLOATING_TRANSITIONAL_HEIGHT: interFloatingTransitionHeight,
tab: state2,
runOnJS: _ReanimatedRexport.runOnJS,
openTab: callback2,
VoicePanelTabAnalyticsSources: _trackVoicePanelTabOpened.VoicePanelTabAnalyticsSources,
scrollLock: sharedValue9
};
h.__workletHash = 13965683053434;
h.__initData = __initData5;
const r71 = r51.onTouchesMove(h);
const r73 = function(a0) {
const r24 = a0.absoluteY - sharedValue5.get().absoluteY;
const r11 = sharedValue5.get().height - sharedValue5.get().y - r24;
if (r11 > sharedValue5.get().drawerTransitionHeight) {
if (!sharedValue5.get().isDrawer) {
sharedValue5.set({
...sharedValue5.get(),
isDrawer: true
});
}
const height2 = calculateVoicePanelHeaderSpecs(safeArea.get(), token2).height;
sharedValue4.set({
...sharedValue4.get(),
x: 0,
y: 0,
width: _VoicePanelControlsUtils.getControlsDrawerOpenWidth(windowDimensions.get().width, safeArea.get().left, safeArea.get().right),
height: Math.min(r11, wrapperDimensions.get().drawerHeight - height2),
drawerMode: true
});
} else {
const r12 = r11 / sharedValue5.get().drawerTransitionHeight;
const height = controlsSpecs4.get().height;
const r3 = -1 * Math.max(r11 - safeArea.get().bottom - height, 0);
if (sharedValue5.get().isDrawer) {
sharedValue5.set({
...sharedValue5.get(),
isDrawer: false
});
}
if (!(height === sharedValue4.get().height || sharedValue4.get().drawerMode)) {
_ReanimatedRexport.runOnJS(_HapticUtils_native.triggerHapticFeedback)(_HapticUtils_native.HapticFeedbackTypes.IMPACT_MEDIUM);
}
sharedValue4.set({
...sharedValue4.get(),
x: 0,
y: -1 * safeArea.get().bottom + r3 * (1 - r12 / 1.5),
width: _VoicePanelControlsUtils.getControlsDefaultWidth(windowDimensions.get().width, safeArea.get().left, safeArea.get().right),
height,
drawerMode: false
});
}
};
r73.__closure = {
gestureSpecs: sharedValue5,
calculateVoicePanelHeaderSpecs,
safeArea,
edgeGutter: token2,
wrapperSpecs: sharedValue4,
getControlsDrawerOpenWidth: _VoicePanelControlsUtils.getControlsDrawerOpenWidth,
windowDimensions,
wrapperDimensions,
controlsSpecs: controlsSpecs4,
runOnJS: _ReanimatedRexport.runOnJS,
triggerHapticFeedback: _HapticUtils_native.triggerHapticFeedback,
HapticFeedbackTypes: _HapticUtils_native.HapticFeedbackTypes,
getControlsDefaultWidth: _VoicePanelControlsUtils.getControlsDefaultWidth
};
r73.__workletHash = 10007030283382;
r73.__initData = __initData4;
const r94 = r71.onChange(r73);
const r96 = function u() {
sharedValue9.set(false);
sharedValue7.set(false);
sharedValue5.set({
...sharedValue5.get(),
active: false
});
_ReanimatedRexport.runOnJS(gestureLock.unlock)();
};
r96.__closure = {
scrollLock: sharedValue9,
isDragScrolling: sharedValue7,
gestureSpecs: sharedValue5,
runOnJS: _ReanimatedRexport.runOnJS,
gestureLock
};
r96.__workletHash = 9808165597638;
r96.__initData = __initData3;
const r103 = r94.onTouchesCancelled(r96);
const r105 = function({ velocityY }) {
let r30;
const r17 = Math.abs(velocityY);
if (r17 > 200 && velocityY < 0) {
sharedValue4.set({
...sharedValue4.get(),
height: wrapperDimensions.get().drawerHeight - calculateVoicePanelHeaderSpecs(safeArea.get(), token2).height
});
r30 = controlsSpecs4.get().mode === VoicePanelControlsModes.DRAWER ? VoicePanelControlsModes.RESET : VoicePanelControlsModes.DRAWER;
} else {
r30 = r17 < 200 && sharedValue5.get().isDrawer ? controlsSpecs4.get().mode === VoicePanelControlsModes.DRAWER ? VoicePanelControlsModes.RESET : VoicePanelControlsModes.DRAWER : controlsSpecs4.get().mode === VoicePanelControlsModes.FLOATING_DEFAULT ? VoicePanelControlsModes.RESET : VoicePanelControlsModes.FLOATING_DEFAULT;
}
sharedValue9.set(false);
sharedValue7.set(false);
_ReanimatedRexport.runOnJS(gestureLock.unlock)(r30);
};
r105.__closure = {
wrapperSpecs: sharedValue4,
wrapperDimensions,
calculateVoicePanelHeaderSpecs,
safeArea,
edgeGutter: token2,
controlsSpecs: controlsSpecs4,
VoicePanelControlsModes,
gestureSpecs: sharedValue5,
scrollLock: sharedValue9,
isDragScrolling: sharedValue7,
runOnJS: _ReanimatedRexport.runOnJS,
gestureLock
};
r105.__workletHash = 12106761920053;
r105.__initData = __initData2;
const r114 = r103.onEnd(r105);
const t = function t() {
sharedValue9.set(false);
sharedValue7.set(false);
_ReanimatedRexport.runOnJS(gestureLock.unlock)();
};
t.__closure = {
scrollLock: sharedValue9,
isDragScrolling: sharedValue7,
runOnJS: _ReanimatedRexport.runOnJS,
gestureLock
};
t.__workletHash = 15918380969837;
t.__initData = __initData;
return r114.onFinalize(t);
}, [controlsSpecs4, gestureLock, sharedValue5, sharedValue7, callback, safeArea, sharedValue9, sharedValue8, sharedValue, state, sharedValue6, windowDimensions, wrapperDimensions, sharedValue2, token2]);
const r184 = () => sharedValue4.get().drawerMode;
r184.__closure = {
wrapperSpecs: sharedValue2
};
r184.__workletHash = 2949834828607;
r184.__initData = __initData8;
const r188 = function u(a0, a1) {
if (a0 !== a1) {
_ReanimatedRexport.runOnJS(_HapticUtils_native.triggerHapticFeedback)(_HapticUtils_native.HapticFeedbackTypes.IMPACT_MEDIUM);
}
};
r188.__closure = {
runOnJS: _ReanimatedRexport.runOnJS,
triggerHapticFeedback: _HapticUtils_native.triggerHapticFeedback,
HapticFeedbackTypes: _HapticUtils_native.HapticFeedbackTypes
};
r188.__workletHash = 10186886451735;
r188.__initData = __initData9;
useAnimatedReaction(r184, r188);
sharedValue10 = sharedValue2;
isScreenReaderEnabled2 = void 0;
c22703_2 = void 0;
controlsSpecs5 = void 0;
windowDimensions2 = void 0;
mode2 = void 0;
setControlsMode2 = void 0;
safeArea2 = void 0;
connected2 = void 0;
isScreenReaderEnabled2 = useIsScreenReaderEnabled();
const windowDimensionsSharedValue_native = useWindowDimensionsSharedValue_native({
ignoreKeyboard: true
});
c22703_2 = windowDimensionsSharedValue_native;
const context3 = useContext(VoicePanelStateContext);
controlsSpecs5 = context3.controlsSpecs;
windowDimensions2 = context3.windowDimensions;
mode2 = context3.mode;
setControlsMode2 = context3.setControlsMode;
safeArea2 = context3.safeArea;
connected2 = context3.connected;
const n = () => ({
connected: connected2.get(),
currentControlsMode: controlsSpecs5.get().mode,
mode: mode2.get(),
windowWidth: windowDimensions2.get().width,
windowHeight: windowDimensions2.get().height,
windowHeightIgnoringKeyboard: c22703_2.get().height,
controlsHeightValue: controlsSpecs5.get().height,
safeArea: safeArea2.get()
});
n.__closure = {
connected: connected2,
controlsSpecs: controlsSpecs5,
mode: mode2,
windowDimensions: windowDimensions2,
windowDimensionsIgnoringKeyboard: windowDimensionsSharedValue_native,
safeArea: safeArea2
};
n.__workletHash = 11588370229444;
n.__initData = __initData10;
const r227 = function(a0, a1) {
let maxHeight, minHeight;
const r24 = a1 == null ? void 0 : a1;
L28: {
if (!_cheapWorkletShallowEqual.cheapWorkletShallowEqual(a0, r24)) {
const { currentControlsMode, mode: mode3, windowWidth, windowHeightIgnoringKeyboard, controlsHeightValue, safeArea: safeArea3 } = a0;
if (VoicePanelModes.DISMISSED !== mode3 && VoicePanelModes.PIP !== mode3) {
VoicePanelModes.PANEL;
if (VoicePanelControlsModes.RESET === currentControlsMode) {
const r109 = _ReanimatedRexport.runOnJS(setControlsMode2);
let mode4 = a1?.currentControlsMode;
if (mode4 == null) {
mode4 = VoicePanelControlsModes.FLOATING_DEFAULT;
}
r109({
mode: mode4
});
return void 0;
}
if (VoicePanelControlsModes.HIDDEN === currentControlsMode) {
if (isScreenReaderEnabled2) {
sharedValue10.set({
...sharedValue10.get(),
hidden: false
});
break L28;
}
if (sharedValue10.get().hidden) {
break L28;
}
sharedValue10.set({
...sharedValue10.get(),
hidden: true
});
break L28;
}
if (VoicePanelControlsModes.FLOATING_DEFAULT === currentControlsMode) {
sharedValue10.set({
x: 0,
y: -1 * Math.max(safeArea3.bottom, EDGE_GUTTER),
width: _VoicePanelControlsUtils.getControlsDefaultWidth(windowWidth, safeArea3.left, safeArea3.right),
height: controlsHeightValue,
drawerMode: false,
hidden: false
});
break L28;
}
if (VoicePanelControlsModes.DRAWER !== currentControlsMode) {
break L28;
}
L14: {
L13: {
const drawerSpec = _VoicePanelControlUtils.getDrawerSpec(windowHeightIgnoringKeyboard, safeArea3.top);
minHeight = drawerSpec.minHeight;
maxHeight = drawerSpec.maxHeight;
if (!(sharedValue10.get().height <= controlsHeightValue)) {
if (a1 != null && sharedValue10.get().height === _VoicePanelControlUtils.getDrawerSpec(a1.windowHeight, a1.safeArea.top).maxHeight) {
break L13;
}
if (!(sharedValue10.get().height >= (maxHeight + minHeight) / 2)) {
break L14;
}
}
}
minHeight = maxHeight;
}
sharedValue10.set({
x: 0,
y: 0,
width: _VoicePanelControlsUtils.getControlsDrawerOpenWidth(windowWidth, safeArea3.left, safeArea3.right),
height: minHeight,
drawerMode: true,
hidden: false
});
break L28;
}
if (!sharedValue10.get().hidden) {
sharedValue10.set({
...sharedValue10.get(),
hidden: true
});
}
return void 0;
}
}
};
r227.__closure = {
cheapWorkletShallowEqual: _cheapWorkletShallowEqual.cheapWorkletShallowEqual,
VoicePanelModes,
wrapperSpecs: sharedValue2,
VoicePanelControlsModes,
runOnJS: _ReanimatedRexport.runOnJS,
setControlsMode: setControlsMode2,
isScreenReaderEnabled: isScreenReaderEnabled2,
EDGE_GUTTER,
getControlsDefaultWidth: _VoicePanelControlsUtils.getControlsDefaultWidth,
getDrawerSpec: _VoicePanelControlUtils.getDrawerSpec,
getControlsDrawerOpenWidth: _VoicePanelControlsUtils.getControlsDrawerOpenWidth
};
r227.__workletHash = 1154430392188;
r227.__initData = __initData11;
useAnimatedReaction(n, r227);
let accessibilityViewIsModal;
[accessibilityViewIsModal, setState2] = useState(false);
const Ae = () => controlsSpecs3.get().mode;
Ae.__closure = {
controlsSpecs: controlsSpecs3
};
Ae.__workletHash = 7719878249076;
Ae.__initData = __initData15;
const De = function De(a0, a1) {
const r3 = a0 !== a1 && isScreenReaderEnabled;
L10: {
if (r3) {
if (a0 === VoicePanelControlsModes.DRAWER && a1 !== VoicePanelControlsModes.DRAWER) {
_ReanimatedRexport.runOnJS(setState2)(true);
break L10;
}
if (a0 !== VoicePanelControlsModes.DRAWER && a1 === VoicePanelControlsModes.DRAWER) {
_ReanimatedRexport.runOnJS(setState2)(false);
}
}
}
};
De.__closure = {
isScreenReaderEnabled,
VoicePanelControlsModes,
runOnJS: _ReanimatedRexport.runOnJS,
setIsDrawer: setState2
};
De.__workletHash = 12036469956927;
De.__initData = __initData16;
useAnimatedReaction(Ae, De);
let state3;
[state3, setState3] = useState(false);
const Me = () => sharedValue2.get().drawerMode;
Me.__closure = {
wrapperSpecs: sharedValue2
};
Me.__workletHash = 2374715205601;
Me.__initData = __initData17;
const be = function be(a0, a1) {
if (a0 !== a1 && c22701_2) {
const r13 = _ReanimatedRexport.runOnJS(setState3);
if (a0) {
r13(true);
} else {
r13(false);
}
}
};
be.__closure = {
isRefreshEnabled,
runOnJS: _ReanimatedRexport.runOnJS,
setIsDrawerActive: setState3
};
be.__workletHash = 1721919006032;
be.__initData = __initData18;
useAnimatedReaction(Me, be);
const id = useId();
const callback3 = useCallback(() => {
setControlsMode({
mode: VoicePanelControlsModes.FLOATING_DEFAULT
});
}, [setControlsMode]);
return
{isMetaQuest() ? null : }
;
});
export default r106;