var h = Object.defineProperty;
var p = (n, e, r) => e in n ? h(n, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[e] = r;
var o = (n, e, r) => (p(n, typeof e != "symbol" ? e + "" : e, r), r);
import { U as c } from "./56c67d3b.js";
import "react";
import { PageLayoutComp as l } from "./232d01a2.js";
import "react-dom";
import "./eb28a942.js";
function d(n) {
  return {
    ...n,
    container: l
  };
}
class F {
  /**
   * If viewFn is not placed in the constructor, the type of ViewReturn cannot be inferred
   */
  constructor(e, r) {
    o(this, "childrenMap");
    o(this, "viewFn");
    o(this, "propertyViewFn");
    this.childrenMap = e, this.viewFn = r;
  }
  setPropertyViewFn(e) {
    return this.propertyViewFn = e, this;
  }
  build() {
    if (!this.propertyViewFn)
      throw new Error("no propertyViewFn provided");
    if (this.childrenMap.hasOwnProperty("container"))
      throw new Error("already has container");
    const e = d(this.childrenMap), r = new c(e, (a, t) => this.viewFn(a, t)).setPropertyViewFn(this.propertyViewFn).build();
    class s extends r {
      realSimpleContainer(t) {
        return this.children.container.realSimpleContainer(t);
      }
      getCompTree() {
        return this.children.container.getCompTree();
      }
      findContainer(t) {
        const i = this.children.container.findContainer(t);
        if (i)
          return i === this.children.container ? this : i;
      }
      getPasteValue(t) {
        return {
          container: this.children.container.getPasteValue(t)
        };
      }
      autoHeight() {
        return this.children.container.autoHeight();
      }
    }
    return s;
  }
}
export {
  F as ContainerCompBuilder,
  d as containerChildren
};
