import { material, project } from "@alilc/lowcode-engine";
import ComponentsPane from '@alilc/lowcode-plugin-components-pane';
var isNewEngineVersion = !!material;
export var componentsPaneRegistry = function componentsPaneRegistry(ctx) {
  return {
    name: "components-pane-registry",
    init: function init() {
      var widget = ctx.skeleton.add({
        area: 'leftArea',
        name: 'componentsPane',
        type: 'PanelDock',
        props: {
          align: "top",
          icon: 'ic_component',
          description: '组件库'
        },
        panelProps: {
          width: 312
        },
        content: ComponentsPane
      });
      widget && widget.disable();

      if (isNewEngineVersion) {
        project.onSimulatorRendererReady(function () {
          widget.enable();
        });
      } else {
        project.onRendererReady(function () {
          widget.enable();
        });
      }
    }
  };
};
componentsPaneRegistry.pluginName = 'componentsPaneRegistry';
export default componentsPaneRegistry;