"use strict";

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

function _react() {
  const data = _interopRequireDefault(require("react"));

  _react = function _react() {
    return data;
  };

  return data;
}

function _assert() {
  const data = _interopRequireDefault(require("assert"));

  _assert = function _assert() {
    return data;
  };

  return data;
}

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

function _default(api) {
  api._registerConfig(() => {
    return () => {
      return {
        name: 'mountElementId',

        validate(val) {
          (0, _assert().default)(typeof val === 'string', `mountElementId should be String, but got ${val}`);
        },

        onChange() {
          api.restart();
        },

        group: 'basic',
        default: 'root',
        type: 'string',
        title: {
          'zh-CN': '根节点元素 ID',
          'en-US': 'Root Element ID'
        },
        description: {
          'zh-CN': '默认是 root，接老项目时才可能需要配。',
          'en-US': 'Default is root.'
        }
      };
    };
  });

  api.modifyDefaultConfig(memo => {
    memo.mountElementId = 'root';
    return memo;
  });
}