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

  setLegacyMode();
  return _objectSpread({
    widget: {
      0: 'radio'
    }[selectWidget]
  }, config);
}, 'config.selectWidget is deprecated. Use config.widget instead. Example: "widget": "radio"');
export default (function (config) {
  if (config.type === 'select') {
    if (config.selectWidget) {
      config = selectWidget(config);
    }
  }

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