/*
    Stophide
*/

class Stophide extends React.Component {
    
    render() {
        //console.log('AAA Stophide = ', this.props.stophide);
        
        if (this.props.stophide) {
            return (
                <div className="form-group hidezones">
                    <div className="form-group-title">Отменить скрытие:</div>
                    <Values data={this.props.stophide} name={'stophide'} onEditValues={(data) => this.props.editStophide(data)} />
                </div>    
            ); 
        } else {
            return (
                <div className="form-group stophide">
                    <div className="form-group-title">Отменить скрытие:</div>
                </div>    
            );  
        }
        
    }
}


function mapStateToProps(state) {
    return {
        stophide: state.stophide
    }
}

function matchDispatchToProps(dispatch) {
    return bindActionCreators({editStophide: editStophide}, dispatch);
}

const ConnectedStophide = connect(mapStateToProps, matchDispatchToProps)(Stophide);
