import _ from "lodash";

import MultiSelector from "./multiselect";
import CanvasResizer from "../../../configuration/canvasresizer";
import PageManager from "./pagemanager";

export default function (editor, opts = {}) {
  const em = editor.getModel();

  [MultiSelector, CanvasResizer, PageManager].forEach((Module) => {
    const module = new Module(editor, opts);

    em.get("modules").push(module);

    if (module.onLoad) em.get("toLoad").push(module);
  });
}
