// Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import * as React from 'react'; import type { AudioDevice } from '@signalapp/ringrtc'; import type { Option } from './Select'; import { Modal } from './Modal'; import { Select } from './Select'; import type { LocalizerType } from '../types/Util'; import type { ChangeIODevicePayloadType, MediaDeviceSettings, } from '../types/Calling'; import { CallingDeviceType } from '../types/Calling'; import { Theme } from '../util/theme'; export type Props = MediaDeviceSettings & { changeIODevice: (payload: ChangeIODevicePayloadType) => void; i18n: LocalizerType; toggleSettings: () => void; }; function localizeDefault(i18n: LocalizerType, deviceLabel: string): string { return deviceLabel.toLowerCase().startsWith('default') ? deviceLabel.replace( /default/i, i18n('icu:callingDeviceSelection__select--default') ) : deviceLabel; } function renderAudioOptions( devices: Array, i18n: LocalizerType ): Array