import { Box, Chip, Icon, IconButton, Icons, Text, Tooltip, TooltipProvider } from 'folds'; import React from 'react'; import { useMatrixClient } from '../../hooks/useMatrixClient'; import { useCallState } from '../../pages/client/call/CallProvider'; import { useRoomNavigate } from '../../hooks/useRoomNavigate'; export function CallNavStatus() { const { activeCallRoomId, isAudioEnabled, isVideoEnabled, isCallActive, toggleAudio, toggleVideo, hangUp, } = useCallState(); const mx = useMatrixClient(); const { navigateRoom } = useRoomNavigate(); const handleGoToCallRoom = () => { if (activeCallRoomId) { navigateRoom(activeCallRoomId); } }; if (!isCallActive) { return null; } return ( {/* Going to need better icons for this */} {!isAudioEnabled ? 'Unmute' : 'Mute'} } > {(triggerRef) => ( )} {!isVideoEnabled ? 'Video On' : 'Video Off'} } > {(triggerRef) => ( )} Hang Up } > {(triggerRef) => ( )} Go to Room } > {(triggerRef) => ( {mx.getRoom(activeCallRoomId)?.name} )} ); }