"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 = ["multiselectWidget"];
var multiselectWidget = (0, _utilDeprecate["default"])(function (_ref) {
  var multiselectWidget = _ref.multiselectWidget,
      config = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
  (0, _legacyMode.setLegacyMode)();
  return (0, _objectSpread2["default"])({
    widget: {
      0: 'checkboxes'
    }[multiselectWidget]
  }, config);
}, 'config.multiselectWidget is deprecated. Use config.widget instead. Example: "widget": "checkboxes"');

var _default = function _default(config) {
  if (config.type === 'multiselect') {
    if (config.multiselectWidget !== undefined) {
      config = multiselectWidget(config);
    }
  }

  return config;
};

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