"use strict";

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

var _utils = require("../utils");

var _babelPresetReactOption = _interopRequireDefault(require("./babel-option-utils/babel-preset-react-option"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

let {
  module: {
    mode,
    disableES5Transpile
  }
} = (0, _utils.getOptions)();
let isProd = mode.toLowerCase() === 'prod';

var _default = () => ({
  presets: [[require.resolve('@babel/preset-env'), disableES5Transpile ? {
    modules: false,
    useBuiltIns: 'usage',
    corejs: 3,
    targets: {
      browsers: ['last 3 Chrome versions', 'last 3 Firefox versions', 'last 3 Edge versions', 'last 3 Safari versions']
    }
  } : {
    modules: false
  }], (0, _babelPresetReactOption.default)({
    disableES5Transpile
  })],
  plugins: [[require.resolve('babel-plugin-transform-define'), isProd ? {
    __DOCS__: false
  } : {}], require.resolve('@babel/plugin-syntax-dynamic-import')]
});

exports.default = _default;