"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _propTypes = _interopRequireDefault(require("prop-types"));
var _reactRedux = require("react-redux");
var _reducers = require("../../reducers");
var _OptionPickerInput = _interopRequireDefault(require("../../components/record/OptionPickerInput"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const mapStateToProps = (state, ownProps) => {
  const {
    source
  } = ownProps;
  return {
    options: (0, _reducers.getOptionList)(state, source)
  };
};
const mapDispatchToProps = {};
const mergeProps = (stateProps, dispatchProps, ownProps) => {
  const {
    source,
    ...remainingOwnProps
  } = ownProps;
  return {
    ...remainingOwnProps,
    ...stateProps,
    ...dispatchProps
  };
};
const ConnectedOptionPickerInput = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps, mergeProps)(_OptionPickerInput.default);
ConnectedOptionPickerInput.propTypes = {
  ..._OptionPickerInput.default.propTypes,
  source: _propTypes.default.string
};
var _default = ConnectedOptionPickerInput;
exports.default = _default;