"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.defaultPanelRegistry = exports["default"] = void 0;
var _lowcodeEditorSkeleton = require("@alilc/lowcode-editor-skeleton");
var _lowcodePluginDesigner = _interopRequireDefault(require("@alilc/lowcode-plugin-designer"));
// 注册默认的面板
var defaultPanelRegistry = function defaultPanelRegistry(editor) {
  var fun = function fun(ctx) {
    return {
      init: function init() {
        var skeleton = ctx.skeleton,
          config = ctx.config;
        skeleton.add({
          area: 'mainArea',
          name: 'designer',
          type: 'Widget',
          content: /*#__PURE__*/React.createElement(_lowcodePluginDesigner["default"], {
            engineConfig: config,
            engineEditor: editor
          })
        });
        if (!config.get('disableDefaultSettingPanel')) {
          skeleton.add({
            area: 'rightArea',
            name: 'settingsPane',
            type: 'Panel',
            content: /*#__PURE__*/React.createElement(_lowcodeEditorSkeleton.SettingsPrimaryPane, {
              engineEditor: editor
            }),
            props: {
              ignoreRoot: true
            }
          });
        }
      }
    };
  };
  fun.pluginName = '___default_panel___';
  return fun;
};
exports.defaultPanelRegistry = defaultPanelRegistry;
var _default = defaultPanelRegistry;
exports["default"] = _default;