import i from "../../../../lodash-es@4.17.22/node_modules/lodash-es/map.js";
const a = {};
class o {
  constructor() {
    this.map = {}, this.configs = [];
  }
  get size() {
    return this.configs.length;
  }
  finalize() {
    this.map = {};
  }
  add(t) {
    const s = n(t);
    s in this.map || (this.map[s] = this.configs.length, this.configs.push(t));
  }
  get elements() {
    return this.configs;
  }
  get alts() {
    return i(this.configs, (t) => t.alt);
  }
  get key() {
    let t = "";
    for (const s in this.map)
      t += s + ":";
    return t;
  }
}
function n(e, t = !0) {
  return `${t ? `a${e.alt}` : ""}s${e.state.stateNumber}:${e.stack.map((s) => s.stateNumber.toString()).join("_")}`;
}
export {
  o as ATNConfigSet,
  a as DFA_ERROR,
  n as getATNConfigKey
};
