import React from 'react'; import PropTypes from 'prop-types'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import { Icon } from 'flavours/glitch/components/icon'; const tooltips = defineMessages({ mentions: { id: 'notifications.filter.mentions', defaultMessage: 'Mentions' }, favourites: { id: 'notifications.filter.favourites', defaultMessage: 'Favourites' }, boosts: { id: 'notifications.filter.boosts', defaultMessage: 'Boosts' }, polls: { id: 'notifications.filter.polls', defaultMessage: 'Poll results' }, follows: { id: 'notifications.filter.follows', defaultMessage: 'Follows' }, statuses: { id: 'notifications.filter.statuses', defaultMessage: 'Updates from people you follow' }, }); class FilterBar extends React.PureComponent { static propTypes = { selectFilter: PropTypes.func.isRequired, selectedFilter: PropTypes.string.isRequired, advancedMode: PropTypes.bool.isRequired, intl: PropTypes.object.isRequired, }; onClick (notificationType) { return () => this.props.selectFilter(notificationType); } render () { const { selectedFilter, advancedMode, intl } = this.props; const renderedElement = !advancedMode ? (