"use strict";
const jsxRuntime = require("./jsx-runtime-B3vWrP5x.cjs");
const aggregator = require("./aggregator-Ca8xiVD2.cjs");
const Toggle = require("./Toggle-CAW20E9V.cjs");
const List = ({
  children,
  data,
  emptyContent,
  omit
}) => {
  const omittedData = Toggle.useMemoCompare(
    () => omit != null ? data == null ? void 0 : data.filter((e) => !omit.includes(e.key)) : data,
    ([prevOmit, prevData], [omit2, data2]) => {
      let omitsEqual = false;
      if (prevOmit != null && omit2 != null)
        omitsEqual = aggregator.S.unorderedPrimitiveArrays(prevOmit, omit2) === aggregator.S.EQUAL;
      else
        omitsEqual = prevOmit == omit2;
      return prevData === data2 && omitsEqual;
    },
    [omit, data]
  );
  return /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(Toggle.InfiniteProvider, { children: /* @__PURE__ */ jsxRuntime.jsxRuntimeExports.jsx(Toggle.DataProvider, { data: omittedData, emptyContent, children }) });
};
exports.List = List;
//# sourceMappingURL=List-J5T88ynF.cjs.map
