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

var _default = function _default(config) {
  if (config.type === 'text' || config.type === 'textarea' || config.type === 'richtext') {
    if (config.textDefault) {
      config = textDefault(config);
    }
  }

  return config;
};

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