import React, { Component } from 'react';
{{#if notNewComponent}}
import {{ properCase componentName }}Component from '{{componentReleativePath}}';
{{/if}}
{{#if wantModule}}
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import {bindComplexActionCreators} from 'rrmb-generator-utils';
import { actions, complexActions } from '{{containerModuleReleativePath}}/{{dashCase name}}-module';
{{/if}}

{{#if newComponent}}
class {{ properCase name }} extends Component { // eslint-disable-line react/prefer-stateless-function
  render() {
    return (
      <div>
        {{ properCase name }} ready
      </div>
    );
  }
}
{{/if}}

{{#if wantModule}}
// mapStateToProps :: {State} -> {Props}
const mapStateToProps = (state) => ({
  // myProp: state.myProp,
});

// mapDispatchToProps :: Dispatch -> {Action}
const mapDispatchToProps = (dispatch) => ({
  actions: {
    ...bindActionCreators(
        actions,
        dispatch
    ),
    ...bindComplexActionCreators(
        complexActions,
        dispatch
    ),
  }
});
{{/if}}

{{#if newComponent}}
const Container = {{ properCase name }};
{{/if}}
{{#if notNewComponent}}
const Container = {{ properCase componentName }}Component;
{{/if}}


{{#if wantModule}}
export default connect(
  mapStateToProps,
  mapDispatchToProps
)(Container);
{{else}}
export default Container;
{{/if}}
