"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

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

var _presenter = _interopRequireDefault(require("./presenter"));

var _redux = require("redux");

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

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

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)
  };
}

var _default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_presenter.default);

exports.default = _default;