// @flow import React from 'react'; import InlineDialog from '@atlaskit/inline-dialog'; import AudioSettingsContent, { type Props as AudioSettingsContentProps } from './AudioSettingsContent'; import { toggleAudioSettings } from '../../../actions'; import { getAudioInputDeviceData, getAudioOutputDeviceData, setAudioInputDevice as setAudioInputDeviceAction, setAudioOutputDevice as setAudioOutputDeviceAction } from '../../../../base/devices'; import { connect } from '../../../../base/redux'; import { getAudioSettingsVisibility } from '../../../functions'; import { getCurrentMicDeviceId, getCurrentOutputDeviceId } from '../../../../base/settings'; 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 (