// @flow import InlineDialog from '@atlaskit/inline-dialog'; import React from 'react'; import { getAudioInputDeviceData, getAudioOutputDeviceData, setAudioInputDeviceAndUpdateSettings, setAudioOutputDevice as setAudioOutputDeviceAction } from '../../../../base/devices'; import { connect } from '../../../../base/redux'; import { getCurrentMicDeviceId, getCurrentOutputDeviceId } from '../../../../base/settings'; import { toggleAudioSettings } from '../../../actions'; import { getAudioSettingsVisibility } from '../../../functions'; import AudioSettingsContent, { type Props as AudioSettingsContentProps } from './AudioSettingsContent'; type Props = AudioSettingsContentProps & { /** * Component's children (the audio button). */ children: React$Node, /** * Flag controlling the visibility of the popup. */ isOpen: boolean, /** * Callback executed when the popup closes. */ onClose: Function, } /** * Popup with audio settings. * * @returns {ReactElement} */ function AudioSettingsPopup({ children, currentMicDeviceId, currentOutputDeviceId, isOpen, microphoneDevices, setAudioInputDevice, setAudioOutputDevice, onClose, outputDevices }: Props) { return (