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

  setLegacyMode();
  return _objectSpread({
    "default": textDefault
  }, other);
}, 'config.textDefault is deprecated. Use config.default instead.');
export default (function (config) {
  if (config.type === 'text' || config.type === 'textarea' || config.type === 'richtext') {
    if (config.textDefault) {
      config = textDefault(config);
    }
  }

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