import { CheckboxControl } from '@wordpress/components'; import { get } from 'lodash'; import PropTypes from 'prop-types'; import { PureComponent } from 'react'; import { connect } from 'react-redux'; import { isFetchingNotificationsSettings } from 'calypso/state/notification-settings/selectors'; import { NOTIFICATIONS_EXCEPTIONS } from './constants'; class StreamOptions extends PureComponent { static displayName = 'NotificationSettingsFormStreamOptions'; static propTypes = { blogId: PropTypes.oneOfType( [ PropTypes.string, PropTypes.number ] ).isRequired, stream: PropTypes.oneOfType( [ PropTypes.string, PropTypes.number ] ).isRequired, settingKeys: PropTypes.arrayOf( PropTypes.string ).isRequired, settings: PropTypes.object.isRequired, onToggle: PropTypes.func.isRequired, isFetching: PropTypes.bool, }; // Assume this is a device stream if not timeline or email isDeviceStream = () => { return [ 'timeline', 'email' ].indexOf( this.props.stream ) === -1; }; render() { return ( ); } } const mapStateToProps = ( state ) => ( { isFetching: isFetchingNotificationsSettings( state ) } ); export default connect( mapStateToProps )( StreamOptions );