/**
 *
 * {{properCase name }} Container
 *
 */

{{#if memo}}
import React, { memo } from 'react';
{{else}}
import React from 'react';
{{/if}}
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { injectIntl } from 'react-intl';
{{#if wantHeaders}}
import { Helmet } from 'react-helmet';
{{/if}}
import { FormattedMessage as T } from 'react-intl';
{{#if wantActionsAndReducer}}
import { createStructuredSelector } from 'reselect';
{{/if}}
import { compose } from 'redux';
{{#if wantSaga}}
import { injectSaga } from 'redux-injectors';
{{/if}}
{{#if wantActionsAndReducer}}
import { selectSomePayLoad } from './selectors';
{{/if}}
{{#if wantSaga}}
import saga from './saga';
{{/if}}

export function {{ properCase name }}() {
  return (
    <div>
    {{#if wantHeaders}}
      <Helmet>
        <title>{{properCase name}}</title>
        <meta name="description" content="Description of {{properCase name}}" />
      </Helmet>
    {{/if}}
    <T id={'{{properCase name}}'} />
    </div>
  )
};

{{ properCase name }}.propTypes = {
  somePayLoad: PropTypes.any,
};

{{#if wantActionsAndReducer}}
const mapStateToProps = createStructuredSelector({
  somePayLoad: selectSomePayLoad(),
})
{{/if}}

function mapDispatchToProps(dispatch) {
  return {
    dispatch,
  };
};

{{#if wantActionsAndReducer}}
const withConnect = connect(mapStateToProps, mapDispatchToProps);
{{else}}
const withConnect = connect(null, mapDispatchToProps);
{{/if}}

export default compose(
  withConnect,
{{#if memo}}
  memo,
{{/if}}
{{#if wantSaga}}
  injectSaga({ key: '{{ camelCase name }}', saga })
  {{/if}}
)({{ properCase name }});

export const {{ properCase name }}Test = compose(injectIntl)({{ properCase name }});
