import { v as e, du as t, P as o, cu as s, dv as a, f as r, cy as i } from "./index-f927b013.js";
import "./lodash-b5661970.js";
import "./ant-design-icons-6bfdc7d5.js";
import "./loglevel-b4003767.js";
import "./axios-04f95181.js";
import "./redux-devtools-8dd21e4f.js";
import "./alasql-f60045ee.js";
import "./antd-2abdded3.js";
import "react";
import "react-dom";
import "./dayjs-2035e031.js";
import "./fontawesome-3904a214.js";
import "./dnd-kit-8227a2db.js";
import "./moment-059406e8.js";
import "./styled-components-7cfa37e6.js";
import "./numbro-47982265.js";
import "./papaparse-07642d76.js";
import "./uuid-bd83cae2.js";
import "./supabase-b2e314d0.js";
import "./fetch-648a91f6.js";
import "./react-draggable-ed505bfc.js";
import "./remark-gfm-18306abe.js";
import "./buffer-d3713d77.js";
import "./rehype-raw-6ebcba88.js";
import "./parse5-f837f753.js";
import "./rehype-sanitize-953d0761.js";
import "./simplebar-react-2133d981.js";
import "./react-best-gradient-color-picker-92c01739.js";
import "./ua-parser-js-c952c07b.js";
import "./clsx-469c2c43.js";
import "./file-saver-55285fc1.js";
import "./codemirror-8412b963.js";
import "./really-relaxed-json-056be70b.js";
import "./immer-c0428a8d.js";
import "./hotkeys-js-699906bc.js";
import "./cnchar-e1339167.js";
import "./react-documents-041601c7.js";
import "./react-sortable-hoc-4fbe0c32.js";
import "./sql-formatter-577b4ab0.js";
import "./rc-trigger-3f038851.js";
import "./react-json-view-5330ce92.js";
import "./qrcode-react-d377d762.js";
const p = e(123), m = "TestComp", l = "comps/lazyLoadComp/lazyLoadComp.test", c = t(m, l);
test("lazyload comp", async () => {
  let e2 = null;
  e2 = new c({ dispatch: (t2) => {
    e2 && (e2 = e2.reduce(t2));
  } }), expect(e2.toJsonValue()).toBe(void 0), await e2.load(), expect(e2.toJsonValue()).toBe(123), e2.dispatchChangeValueAction(345), expect(e2.toJsonValue()).toBe(345);
}), test("lazyload comp keep values", async () => {
  let e2 = null;
  e2 = new c({ dispatch: (t2) => {
    e2 && (e2 = e2.reduce(t2));
  }, value: 456 }), expect(e2.toJsonValue()).toBe(456), await e2.load(), expect(e2.toJsonValue()).toBe(456);
}), test("lazyload comp exposing data", async () => {
  const s2 = t(m, l, async () => a(r({ hello: e(123) }), (e2) => ({ hello: e2.children.hello.getView() })));
  let i2 = null;
  i2 = new s2({ dispatch: (e2) => {
    i2 && (i2 = i2.reduce(e2));
  } }), await i2.load();
  const p2 = o(i2);
  expect(p2.exposingValues.hello).toBe(123);
}), test("lazyload comp execute method", async () => {
  const o2 = t(m, l, async () => i(r({ hello: e(123) }), [{ method: { name: "add", params: [{ name: "value", type: "number" }] }, execute: (e2, t2) => {
    const o3 = e2.children.hello;
    o3.dispatchChangeValueAction(o3.getView() + t2[0]);
  } }]));
  let a2 = null;
  a2 = new o2({ dispatch: (e2) => {
    a2 && (a2 = a2.reduce(e2));
  } }), await a2.load(), a2.reduce(s({ type: "execute", methodName: "add", params: [10] }, false)), await new Promise((e2) => setTimeout(e2, 20)), expect(a2.children.hello.getView()).toEqual(133);
});
export {
  p as TestComp
};
