import { j as jsxRuntimeExports } from "./jsx-runtime-mMz73N64.js";
import { c as S } from "./aggregator-Dl2jHye5.js";
import { f as useMemoCompare, g as InfiniteProvider, h as DataProvider } from "./Toggle-DcOiWiHG.js";
const List = ({
  children,
  data,
  emptyContent,
  omit
}) => {
  const omittedData = 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 = S.unorderedPrimitiveArrays(prevOmit, omit2) === S.EQUAL;
      else
        omitsEqual = prevOmit == omit2;
      return prevData === data2 && omitsEqual;
    },
    [omit, data]
  );
  return /* @__PURE__ */ jsxRuntimeExports.jsx(InfiniteProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(DataProvider, { data: omittedData, emptyContent, children }) });
};
export {
  List as L
};
//# sourceMappingURL=List-aJEsDHql.js.map
