import assetManager from './assetManager';
import canvasManager from './canvasmanager';
import styleManager from './styleManager';
import blockManager from './blockmanager';
import pageManager from './pagemanager';
import eventManager from './eventmanager';
import layerManager from './layerManager';
import favoriteManager from './favoriteManager';
import rightPanelManager from './rightPanelManager';
import toolbarManager from './toolbarManager';
import keymaps from './keymaps';

export default (grapesjs) => {
  grapesjs.plugins.add('plugin-sp-managers', function (editor, opts = {}) {
    [assetManager, canvasManager, blockManager, styleManager, pageManager, eventManager, favoriteManager, rightPanelManager, toolbarManager, layerManager, keymaps].forEach(manager => {
      manager(editor, opts);
    });
  });
}
