import PropTypes from 'prop-types'; import { PureComponent } from 'react'; import { FormattedMessage } from 'react-intl'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { connect } from 'react-redux'; import Button from 'flavours/glitch/components/button'; import Option from './components/option'; const mapStateToProps = state => ({ rules: state.getIn(['server', 'server', 'rules']), }); class Rules extends PureComponent { static propTypes = { onNextStep: PropTypes.func.isRequired, rules: ImmutablePropTypes.list, selectedRuleIds: ImmutablePropTypes.set.isRequired, onToggle: PropTypes.func.isRequired, }; handleNextClick = () => { const { onNextStep } = this.props; onNextStep('statuses'); }; handleRulesToggle = (value, checked) => { const { onToggle } = this.props; onToggle(value, checked); }; render () { const { rules, selectedRuleIds } = this.props; return ( <>