import { D as w, aA as x, a5 as c, j as g } from "./index-b203ecbb.js";
import { useMemo as f, useCallback as k } from "react";
import D from "./index-c673e3ee.js";
import "react-dom";
import "./util-63c4ca8a.js";
import "./index-56e81c67.js";
import "./style-c902ea32.js";
const V = (u) => {
  const {
    handleUpdateMultiAttrDSL: t,
    handleUpdateOtherMultiAttrDSL: r,
    widgetDisplayName: y
  } = u, a = w(
    (s) => {
      const o = x(s);
      return c(o, y, {});
    }
  ), i = f(() => c(a, "viewList", []), [a]), n = f(() => c(a, "linkWidgetDisplayName"), [a]), d = k(
    (s, o) => {
      const p = i.findIndex((m) => m.key === o);
      let e = 0, l = i[e].key;
      p > -1 && (e = p, l = i[e].key), t == null || t({
        [s]: o,
        currentIndex: e,
        currentKey: l
      }), n && Array.isArray(n) && n.forEach((m) => {
        r == null || r(m, {
          currentIndex: e,
          currentKey: l
        });
      });
    },
    [
      i,
      n,
      t,
      r
    ]
  );
  return /* @__PURE__ */ g(D, { ...u, handleUpdateDsl: d });
};
V.displayName = "ContainerDefaultViewKeySetter";
export {
  V as default
};
//# sourceMappingURL=defaultViewKeySetter-6faba009.js.map
