"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _list = _interopRequireDefault(require("../ui/list"));
var _actions = require("./actions");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// TODO: these actions should be passed as props
var _default = exports.default = function _default(_ref) {
  var icon = _ref.icon,
    iconUrl = _ref.iconUrl,
    model = _ref.model,
    name = _ref.name,
    items = _ref.items;
  return /*#__PURE__*/_react.default.createElement(_list.default, {
    model: model,
    icon: icon,
    iconUrl: iconUrl,
    items: items,
    onSelect: function onSelect(x) {
      return (0, _actions.selectOption)(model.get('id'), name, x);
    },
    onCancel: function onCancel() {
      return (0, _actions.cancelOptionSelection)(model.get('id'));
    }
  });
};
