import React, { ReactNode } from 'react'; import { connect } from 'react-redux'; import { IReduxState } from '../../../../app/types'; import { areAudioLevelsEnabled } from '../../../../base/config/functions.web'; import { setAudioInputDeviceAndUpdateSettings, setAudioOutputDevice as setAudioOutputDeviceAction } from '../../../../base/devices/actions.web'; import { getAudioInputDeviceData, getAudioOutputDeviceData } from '../../../../base/devices/functions.web'; import Popover from '../../../../base/popover/components/Popover.web'; import { SMALL_MOBILE_WIDTH } from '../../../../base/responsive-ui/constants'; import { getCurrentMicDeviceId, getCurrentOutputDeviceId } from '../../../../base/settings/functions.web'; import { toggleAudioSettings } from '../../../actions'; import { getAudioSettingsVisibility } from '../../../functions.web'; import AudioSettingsContent, { type IProps as AudioSettingsContentProps } from './AudioSettingsContent'; interface IProps extends AudioSettingsContentProps { /** * Component's children (the audio button). */ children: ReactNode; /** * Flag controlling the visibility of the popup. */ isOpen: boolean; /** * Callback executed when the popup closes. */ onClose: Function; /** * The popup placement enum value. */ popupPlacement: string; } /** * Popup with audio settings. * * @returns {ReactElement} */ function AudioSettingsPopup({ children, currentMicDeviceId, currentOutputDeviceId, isOpen, microphoneDevices, setAudioInputDevice, setAudioOutputDevice, onClose, outputDevices, popupPlacement, measureAudioLevels }: IProps) { return (