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

  setLegacyMode();
  return _objectSpread({
    "default": booleanDefault
  }, other);
}, 'config.booleanDefault is deprecated. Use config.default instead.');
export default (function (config) {
  if (config.type === 'boolean') {
    if (config.booleanDefault !== undefined) {
      config = booleanDefault(config);
    }
  }

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