// Metro module 16028 (f16029). import { memo, useContext, useCallback, useEffect, useMemo } from "react"; import { ScrollView } from "react-native"; import ChannelStore from "../../../../stores/ChannelStore"; import { CONTROLS_DRAWER_HEADER_EXPANDED_SIZE } from "./VoicePanelControlsConstants"; import { createStyles } from "../../../../design/components/Styles/native/createStyles"; import Module712 from "../../../../_bundle/Module712"; import ReanimatedRexport, { useSharedValue } from "../../../reanimated/ReanimatedRexport"; import VoicePanelStateContext from "../VoicePanelStateContext"; import useIsConnectedToVoiceChannel from "../hooks/useIsConnectedToVoiceChannel"; import { useEmbeddedActivityLaunchability, EmbeddedActivityLaunchability } from "../../../activities/utils/getEmbeddedActivityLaunchability"; import { DeveloperMode } from "../../../user_settings/UserSettings"; import MobileGoLiveEntrypointExperiment, { MobileGoLiveEntrypointTreatment } from "../../../go_live/MobileGoLiveEntrypointExperiment"; import MobileAudioOutputExperiment from "../../../media_engine/MobileAudioOutputExperiment"; import useSelectedActiveStream from "../../../video_calls/native/useSelectedActiveStream"; import { Stack } from "../../../../design/components/Stack/native/Stack.native"; import { TableRowGroup } from "../../../../design/components/TableRow/native/TableRowGroup.native"; import { ActivitiesButton, ChatButton, SoundboardButton, ScreenshareButton, GameConsoles, StreamVolumeItem, DeafenSwitch, AudioRouteButton, HideNonVideoParticipants, HideSelfVideo, InviteButton, VoiceSettingsButton, ReportStreamIssueButton, LeaveActivitiesButton, ShareActivityLogsButton, ToggleShowActivitiesDebugOverlay } from "./VoicePanelVoiceControlsButtons"; import { intl, t } from "../../../../intl/index.native"; import { VoiceProcessingOptions } from "../../../user_settings/voice/native/UserSettingsVoiceProcessing"; import { useStateFromStores } from "../../../../_bundle/Module589"; import { ControlsGestureScrollLock } from "./utils/createUseAnimatedScrollLock"; import { useIsScreenReaderEnabled } from "../../../a11y/native/useIsScreenReaderEnabled.native"; import { GestureDetector, Gesture } from "../../../../_bundle/Module5273"; import { isMetaQuest } from "../../../device/MetaQuestUtils.android"; import NativeView from "../../../core/native/NativeView"; import { SafeAreaPaddingView } from "../../../../components_native/common/SafeAreaView"; import VoicePanelHeaderGlassBlur from "../shared/VoicePanelHeaderGlassBlur"; let useStyles, AnimatedComponent, Component, scrollIndicatorInsets, __initData; const NOOP = function NOOP() {}; useStyles = createStyles({ scrollView: { flex: 1, paddingHorizontal: Module712.space.PX_16 }, scrollViewScreenReader: { flex: 1, paddingHorizontal: Module712.space.PX_16, marginTop: CONTROLS_DRAWER_HEADER_EXPANDED_SIZE }, blurRegion: { height: CONTROLS_DRAWER_HEADER_EXPANDED_SIZE } }); AnimatedComponent = ReanimatedRexport.createAnimatedComponent(ScrollView); Component = memo(function({ channel, openTab }) { const channelId2 = useContext(VoicePanelStateContext).channelId; const isConnectedToVoiceChannel = useIsConnectedToVoiceChannel(channelId2); const embeddedActivityLaunchability = useEmbeddedActivityLaunchability(channelId2); const setting = DeveloperMode.useSetting(); const treatment = MobileGoLiveEntrypointExperiment.useConfig({ location: "VoicePanelVoiceControls" }).treatment; let nonContextualStreamOutputPresent = MobileAudioOutputExperiment.useConfig({ location: "VoicePanelVoiceControls" }).nonContextualStreamOutputPresent; const selectedActiveStream = useSelectedActiveStream(channel); const r79 = [isConnectedToVoiceChannel ? {MobileGoLiveEntrypointTreatment.SCREENSHARE_REPLACES_CHAT === treatment ? : MobileGoLiveEntrypointTreatment.SCREENSHARE_REPLACES_SOUNDBOARD === treatment ? : } : isConnectedToVoiceChannel, , , , , , ,]; if (nonContextualStreamOutputPresent) { nonContextualStreamOutputPresent = ; } r79[2] = nonContextualStreamOutputPresent; r79[3] = {isConnectedToVoiceChannel && } ; r79[4] = ; r79[5] = {selectedActiveStream != null && } ; r79[6] = isConnectedToVoiceChannel ? setting ? embeddedActivityLaunchability === EmbeddedActivityLaunchability.CAN_LAUNCH ? : null : null : null; return {r79}; }); scrollIndicatorInsets = { top: CONTROLS_DRAWER_HEADER_EXPANDED_SIZE }; __initData = { code: "function VoicePanelVoiceControlsTsx1({offset:offset}){const{isScrolled}=this.__closure;isScrolled.set(offset>0);}" }; const r56 = memo(function VoicePanelVoiceControls(props) { let sharedValue, gestureRef, scrollerRef; const { isVisible, openTab } = props; sharedValue = void 0; gestureRef = void 0; scrollerRef = void 0; const styles = useStyles(); const channelId = useContext(VoicePanelStateContext).channelId; const stateFromStores = useStateFromStores([ChannelStore], () => ChannelStore.getChannel(channelId)); sharedValue = useSharedValue(false); const r37 = function(a0) { sharedValue.set(a0.offset > 0); }; r37.__closure = { isScrolled: sharedValue }; r37.__workletHash = 16758626276795; r37.__initData = __initData; const callback = useCallback(r37, [sharedValue]); const r48 = useContext(ControlsGestureScrollLock)({ onScrollHandlerWorkletized: callback }); const onScroll = r48.onScroll; gestureRef = r48.gestureRef; scrollerRef = r48.scrollerRef; const animatedProps = r48.animatedProps; const isScreenReaderEnabled = useIsScreenReaderEnabled(); useEffect(() => { let r2 = isVisible; if (isVisible) { r2 = scrollerRef != null; } if (r2) { const current = scrollerRef.current; if (current != null) { current.scrollTo({ x: 0, y: 0, animated: false }); } } }, [isVisible, scrollerRef]); return <> { const r15 = Gesture.Native().enabled(!isMetaQuest()); return gestureRef != null ? r15.simultaneousWithExternalGesture(gestureRef) : r15; }, [gestureRef])}> {isScreenReaderEnabled ? !isScreenReaderEnabled : } {stateFromStores != null && } {isScreenReaderEnabled ? !isScreenReaderEnabled : } ; }); export default r56;