import _createClass from "@babel/runtime/helpers/createClass";
import { createElement } from 'react';
var BaseWidget = /*#__PURE__*/function () {
  function BaseWidget(name, config) {
    this.name = void 0;
    this.config = void 0;
    this.visible = true;
    this.name = name;
    this.config = config;
  }
  var _proto = BaseWidget.prototype;
  _proto.getName = function getName() {
    return this.name;
  };
  _proto.hide = function hide() {
    this.visible = false;
  };
  _proto.show = function show() {
    this.visible = true;
  };
  _proto.toggle = function toggle() {
    this.visible = !this.visible;
  };
  _createClass(BaseWidget, [{
    key: "content",
    get: function get() {
      return /*#__PURE__*/createElement(this.config.content, this.config.contentProps);
    }
  }]);
  return BaseWidget;
}();
export { BaseWidget as default };