"use strict";

require("core-js/modules/es.object.to-string.js");
require("core-js/modules/es.reflect.construct.js");
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
Object.defineProperty(exports, "CMSModal", {
  enumerable: true,
  get: function get() {
    return _modal.default;
  }
});
exports.default = void 0;
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _base = _interopRequireDefault(require("./base"));
var _modal = _interopRequireDefault(require("./modal"));
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
/**
 * 单例模式使用方式
 *
 * new CMSSDK().api
 * 或
 * CMSSDK.getInstance().api
 */
var CMSSDK = /*#__PURE__*/function (_BaseSDK) {
  (0, _inherits2.default)(CMSSDK, _BaseSDK);
  var _super = _createSuper(CMSSDK);
  function CMSSDK() {
    (0, _classCallCheck2.default)(this, CMSSDK);
    return _super.apply(this, arguments);
  }
  (0, _createClass2.default)(CMSSDK, null, [{
    key: "getInstance",
    value: function getInstance(opts) {
      this.__instance.setConfig(opts || {
        url: ''
      });
      return this.__instance;
    }
  }]);
  return CMSSDK;
}(_base.default);
exports.default = CMSSDK;
(0, _defineProperty2.default)(CMSSDK, "__instance", new CMSSDK({
  url: ''
}));