'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _reactRedux = require('../../../react-redux');

var _presenter = require('./presenter');

var _presenter2 = _interopRequireDefault(_presenter);

var _redux = require('redux');

var _tagAssociations = require('../../../../common/actions/tagAssociations');

var _tagAssociations2 = require('../../../../banks/api/tagAssociations');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function mapStateToProps(state, props) {
  return {
    tagSuggestions: state.getIn(['tagAssociations', 'tagSuggestions', props.parentType, props.parentId])
  };
}

function mapDispatchToProps(dispatch) {
  return {
    getTagSuggestions: (0, _redux.bindActionCreators)(_tagAssociations2.getTagSuggestions, dispatch),
    setTagSuggestions: (0, _redux.bindActionCreators)(_tagAssociations.setTagSuggestions, dispatch),
    setTagInput: (0, _redux.bindActionCreators)(_tagAssociations.setTagInput, dispatch)
  };
}

exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_presenter2.default);