import { q as s, Y as n, gp as m, O as d, a6 as c, G as u, _ as g, gq as x, F as i, dm as C, dj as w, dl as b, gr as V, dt as f } from "./603b75d9.js";
import { useContext as h } from "react";
import { O as r } from "./158dca8d.js";
import "react-dom";
import "./18a95abc.js";
import "./c2be1293.js";
import "./4963ac97.js";
import "./ffcffc16.js";
import "./62f393ec.js";
import "./26dac75c.js";
import "./11b05d65.js";
import "./56edae87.js";
import "./0cc240d3.js";
import "./00d44232.js";
import "./f9847c56.js";
import "./a4d0e31e.js";
import "./41aba172.js";
import "./e735e391.js";
import "./140b48ce.js";
import "./f5fb28b1.js";
import "./930af84f.js";
import "./9c5ea6de.js";
import "./7f1b43fa.js";
import "./cee178c0.js";
import "./43b58a96.js";
import "./19a46fb5.js";
import "./98f17e53.js";
import "./794d827a.js";
import "./0cdeb449.js";
import "./d50792b8.js";
import "./f64a8554.js";
import "./cf72e8e5.js";
import "./84cede66.js";
import "./3dfed0b7.js";
import "./57f24d28.js";
import "./be662667.js";
import "./8064caf1.js";
import "./d8fd0c14.js";
const p = s(V), S = (o) => /* @__PURE__ */ i(f, {
  ...o,
  emptyRows: 15,
  autoHeight: !0
});
function I(o) {
  const {
    containerProps: t
  } = o, e = h(w);
  return /* @__PURE__ */ i(S, {
    ...t,
    isDroppable: !1,
    isDraggable: !1,
    isResizable: !1,
    isSelectable: !1,
    bgColor: e,
    items: b(t.items),
    hintPlaceholder: "",
    containerPadding: [4, 4]
  });
}
let P = function() {
  const o = n("table.expandable");
  return new m({
    expandable: d,
    slot: p
  }, () => ({
    expandableConfig: {},
    expandModalView: null
  })).setControlItemData({
    filterText: o
  }).setPropertyViewFn((t, e) => /* @__PURE__ */ c(u, {
    children: [t.expandable.propertyView({
      label: o
    }), t.expandable.getView() && t.slot.getSelectedComp().getComp().propertyView({
      buttonText: n("table.configExpandedView")
    })]
  })).build();
}();
class mt extends P {
  getView() {
    if (!this.children.expandable.getView())
      return {
        expandableConfig: {},
        expandModalView: null
      };
    const t = this.children.slot.getSelectedComp();
    return {
      expandableConfig: {
        expandedRowRender: (e, a) => {
          const l = this.children.slot.getView()({
            currentRow: g.omit(e, r),
            currentIndex: a,
            currentOriginalIndex: x(e[r])
          }, String(e[r])).children.container.getView();
          return /* @__PURE__ */ i(I, {
            containerProps: l
          }, e[r]);
        }
      },
      expandModalView: t.getView()
    };
  }
  setSelectionAction(t, e) {
    return C("slot", p.setSelectionAction(t, e));
  }
  getPasteValue(t) {
    return {
      ...this.toJsonValue(),
      slot: this.children.slot.getSelectedComp().getComp().getPasteValue(t)
    };
  }
  reduce(t) {
    return super.reduce(t);
  }
}
export {
  mt as ExpansionControl
};
