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 (
No active call
);
}
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}
)}
);
}