import { logger } from 'matrix-js-sdk/lib/logger'; import { NavLink, useParams } from 'react-router-dom'; import { Box, Chip, Icon, IconButton, Icons, Text, Tooltip, TooltipProvider } from 'folds'; import React from 'react'; import { useMatrixClient } from '../../hooks/useMatrixClient'; import { useCallState } from '../client/CallProvider'; export function CallNavBottom() { const { activeCallRoomId, isAudioEnabled, isVideoEnabled, toggleAudio, toggleVideo, hangUp } = useCallState(); const mx = useMatrixClient(); const { roomIdOrAlias: viewedRoomId } = useParams<{ roomIdOrAlias: string }>(); if (!activeCallRoomId) { 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) => viewedRoomId !== (activeCallRoomId ?? '') ? ( {mx.getRoom(activeCallRoomId)?.normalizedName} ) : ( {mx.getRoom(activeCallRoomId)?.normalizedName} ) } ); }