import { createNode as o } from "./accelbyte-widgets721.mjs";
import { stringifyPair as f } from "./accelbyte-widgets727.mjs";
import { addPairToJSMap as u } from "./accelbyte-widgets728.mjs";
import { NODE_TYPE as p, PAIR as d, isNode as t } from "./accelbyte-widgets711.mjs";
function y(s, r, e) {
  const i = o(s, void 0, e), a = o(r, void 0, e);
  return new n(i, a);
}
class n {
  constructor(r, e = null) {
    Object.defineProperty(this, p, { value: d }), this.key = r, this.value = e;
  }
  clone(r) {
    let { key: e, value: i } = this;
    return t(e) && (e = e.clone(r)), t(i) && (i = i.clone(r)), new n(e, i);
  }
  toJSON(r, e) {
    const i = e != null && e.mapAsMap ? /* @__PURE__ */ new Map() : {};
    return u(e, i, this);
  }
  toString(r, e, i) {
    return r != null && r.doc ? f(this, r, e, i) : JSON.stringify(this);
  }
}
export {
  n as Pair,
  y as createPair
};
