import { useState } from 'react'; import { useVoiceStore } from '../stores/voice.ts'; import { DeviceSettingsModal } from './DeviceSettingsModal.tsx'; export function VoiceControls() { const [showDeviceSettings, setShowDeviceSettings] = useState(false); const isMuted = useVoiceStore((state) => state.isMuted); const isDeafened = useVoiceStore((state) => state.isDeafened); const isVideoOn = useVoiceStore((state) => state.isVideoOn); const isScreenSharing = useVoiceStore((state) => state.isScreenSharing); const noiseSuppression = useVoiceStore((state) => state.noiseSuppression); const toggleMute = useVoiceStore((state) => state.toggleMute); const toggleDeafen = useVoiceStore((state) => state.toggleDeafen); const toggleVideo = useVoiceStore((state) => state.toggleVideo); const toggleScreenShare = useVoiceStore((state) => state.toggleScreenShare); const toggleNoiseSuppression = useVoiceStore((state) => state.toggleNoiseSuppression); const leaveVoice = useVoiceStore((state) => state.leaveVoice); return (
{showDeviceSettings && ( setShowDeviceSettings(false)} /> )}
); }