import { YAMLSeq as r } from "./accelbyte-widgets731.mjs";
import { resolveProps as h } from "./accelbyte-widgets739.mjs";
import { flowIndentCheck as q } from "./accelbyte-widgets766.mjs";
function A({ composeNode: u, composeEmptyNode: d }, n, m, o, f) {
  const p = (f == null ? void 0 : f.nodeClass) ?? r, i = new p(n.schema);
  n.atRoot && (n.atRoot = !1);
  let s = m.offset, l = null;
  for (const { start: c, value: t } of m.items) {
    const e = h(c, {
      indicator: "seq-item-ind",
      next: t,
      offset: s,
      onError: o,
      startOnNewline: !0
    });
    if (!e.found)
      if (e.anchor || e.tag || t)
        t && t.type === "block-seq" ? o(e.end, "BAD_INDENT", "All sequence items must start at the same column") : o(s, "MISSING_CHAR", "Sequence item without - indicator");
      else {
        l = e.end, e.comment && (i.comment = e.comment);
        continue;
      }
    const a = t ? u(n, t, e, o) : d(n, e.end, c, null, e, o);
    n.schema.compat && q(m.indent, t, o), s = a.range[2], i.items.push(a);
  }
  return i.range = [m.offset, s, l ?? s], i;
}
export {
  A as resolveBlockSeq
};
