import _createClass from "@babel/runtime/helpers/createClass";
import { createElement } from 'react';
import { makeAutoObservable } from 'mobx';
var Panel = /*#__PURE__*/function () {
  function Panel(name, config) {
    this.isPanel = true;
    this.name = void 0;
    this.config = void 0;
    this.visible = true;
    this.name = name;
    this.config = config;
    makeAutoObservable(this, {
      isPanel: false,
      config: false,
      name: false
    });
  }
  var _proto = Panel.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(Panel, [{
    key: "content",
    get: function get() {
      return /*#__PURE__*/createElement(this.config.content, this.config.contentProps);
    }
  }]);
  return Panel;
}();
export { Panel as default };