import s from "./ConversationTask.js";
function f(e, o) {
  if (o <= 0 || o >= 1)
    throw new Error("validationSplit must be between 0 and 1");
  e.forEach((n) => n.shuffle());
  const r = [], a = [];
  for (const n of e)
    for (; n.hasMoreConversations(); ) {
      const t = n.nextConversation();
      if (!t)
        break;
      Math.random() < o ? a.push(t) : r.push(t);
    }
  return {
    training: new s(r),
    validation: new s(a)
  };
}
export {
  f as default
};
