"use strict";

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

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

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

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

var _utilDeprecate = _interopRequireDefault(require("util-deprecate"));

var _legacyMode = require("../../legacyMode");

var _excluded = ["selectWidget"];
var selectWidget = (0, _utilDeprecate["default"])(function (_ref) {
  var selectWidget = _ref.selectWidget,
      config = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
  (0, _legacyMode.setLegacyMode)();
  return (0, _objectSpread2["default"])({
    widget: {
      0: 'radio'
    }[selectWidget]
  }, config);
}, 'config.selectWidget is deprecated. Use config.widget instead. Example: "widget": "radio"');

var _default = function _default(config) {
  if (config.type === 'select') {
    if (config.selectWidget) {
      config = selectWidget(config);
    }
  }

  return config;
};

exports["default"] = _default;
//# sourceMappingURL=selectWidget.cjs.map