import { M as r, S as h, ad as l, F as m, G as d, o as g, J as n, dv as i, e6 as a } from "./603b75d9.js";
import "react";
import "react-dom";
const C = new r({
  v1: h,
  v2: l
}, (t) => t).setPropertyViewFn(() => /* @__PURE__ */ m(d, {})).build(), v = {
  value: {
    v1: "v1: {{a + 1}}",
    v2: "{{a + 2}}"
  }
}, u = g(C);
describe("withMultiContext", () => {
  it("common", () => {
    let t = new u({
      dispatch: (p) => {
        t = n(t.reduce(p));
      },
      ...v
    });
    t = n(t);
    const o = "k1", s = t.getView()({
      a: 11
    }, o).getView();
    expect(s.v1 === "v1: 12").toBeTruthy(), expect(s.v2 === 13).toBeTruthy();
    let e = t.getOriginalComp().changeDispatch(i(i(t.dispatch, a), o)).getComp();
    e.dispatch(e.changeChildAction("v2", "{{a + 3}}")), expect(t.children[a].getView()[o].getView().v2).toEqual(14);
    const c = "not-exist";
    e = t.getOriginalComp().changeDispatch(i(i(t.dispatch, a), c)).getComp(), e.dispatch(e.changeChildAction("v2", "{{a + 3}}")), expect(t.children[a].getView().hasOwnProperty(c)).toBeFalsy();
  });
});
