import PropTypes from 'prop-types'; import React, { Component } from 'react'; import Alert from 'Components/Alert'; import FieldSet from 'Components/FieldSet'; import Button from 'Components/Link/Button'; import LoadingIndicator from 'Components/Loading/LoadingIndicator'; import ModalBody from 'Components/Modal/ModalBody'; import ModalContent from 'Components/Modal/ModalContent'; import ModalFooter from 'Components/Modal/ModalFooter'; import ModalHeader from 'Components/Modal/ModalHeader'; import { kinds } from 'Helpers/Props'; import translate from 'Utilities/String/translate'; import AddDownloadClientItem from './AddDownloadClientItem'; import styles from './AddDownloadClientModalContent.css'; class AddDownloadClientModalContent extends Component { // // Render render() { const { isSchemaFetching, isSchemaPopulated, schemaError, usenetDownloadClients, torrentDownloadClients, onDownloadClientSelect, onModalClose } = this.props; return ( {translate('AddDownloadClient')} { isSchemaFetching && } { !isSchemaFetching && !!schemaError &&
{translate('AddDownloadClientError')}
} { isSchemaPopulated && !schemaError &&
{translate('SupportedDownloadClients')}
{translate('SupportedDownloadClientsMoreInfo')}
{ usenetDownloadClients.map((downloadClient) => { return ( ); }) }
{ torrentDownloadClients.map((downloadClient) => { return ( ); }) }
}
); } } AddDownloadClientModalContent.propTypes = { isSchemaFetching: PropTypes.bool.isRequired, isSchemaPopulated: PropTypes.bool.isRequired, schemaError: PropTypes.object, usenetDownloadClients: PropTypes.arrayOf(PropTypes.object).isRequired, torrentDownloadClients: PropTypes.arrayOf(PropTypes.object).isRequired, onDownloadClientSelect: PropTypes.func.isRequired, onModalClose: PropTypes.func.isRequired }; export default AddDownloadClientModalContent;