import _objectSpread from "@babel/runtime/helpers/objectSpread2";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["multiselectWidget"];
import deprecate from 'util-deprecate';
import { setLegacyMode } from '../../legacyMode';
var multiselectWidget = deprecate(function (_ref) {
  var multiselectWidget = _ref.multiselectWidget,
      config = _objectWithoutProperties(_ref, _excluded);

  setLegacyMode();
  return _objectSpread({
    widget: {
      0: 'checkboxes'
    }[multiselectWidget]
  }, config);
}, 'config.multiselectWidget is deprecated. Use config.widget instead. Example: "widget": "checkboxes"');
export default (function (config) {
  if (config.type === 'multiselect') {
    if (config.multiselectWidget !== undefined) {
      config = multiselectWidget(config);
    }
  }

  return config;
});
//# sourceMappingURL=multiselectWidget.js.map