import { UndoManager } from '../../../../../node_modules/.pnpm/yjs@13.6.26/node_modules/yjs/dist/yjs.js';
import { yCollab } from '../../../../../node_modules/.pnpm/y-codemirror.next@0.3.5_@codemirror_state@6.5.2_@codemirror_view@6.28.6_yjs@13.6.26/node_modules/y-codemirror.next/src/index.js';

function cmCollab({ awareness, component }) {
  const undoManager = new UndoManager(component);
  return yCollab(
    component,
    awareness,
    { undoManager }
  );
}

export { cmCollab };
