"use client";
import * as React from "react";
import { useComboboxDerivedItemsContext } from "../root/ComboboxRootContext.js";
import { useGroupCollectionContext } from "./GroupCollectionContext.js";
import { jsx } from "react/jsx-runtime";
function ComboboxCollection(props) {
  const {
    children
  } = props;
  const {
    filteredItems
  } = useComboboxDerivedItemsContext();
  const groupContext = useGroupCollectionContext();
  const itemsToRender = groupContext ? groupContext.items : filteredItems;
  if (!itemsToRender) {
    return null;
  }
  return /* @__PURE__ */ jsx(React.Fragment, {
    children: itemsToRender.map(children)
  });
}
export {
  ComboboxCollection
};
//# sourceMappingURL=ComboboxCollection.js.map
