import { Section as l, Item as s } from "../../../../../../@react-stately/collections/dist/module.es.js";
import i from "react";
const p = (t, e) => ({
  "aria-label": t,
  children: e.map(({ id: a, menuItems: m, ariaLabel: d }) => /* @__PURE__ */ i.createElement(l, {
    title: a,
    key: a,
    "aria-label": d
  }, m.map((r) => /* @__PURE__ */ i.createElement(s, {
    key: r.id
  }, r.title))))
}), f = (t) => t.flatMap(({ menuItems: e }) => e), n = (t) => t.reduce((e, a) => ({ ...e, [a.id]: a }), {}), b = (t) => new Set(
  t.reduce((e, a) => [...e, a.disabled ? a.id : ""], []).filter((e) => e !== "").map((e) => e.toString())
);
export {
  b as getDisabledItemIds,
  n as getKeyItemRecord,
  f as getMenuItems,
  p as mapToAriaProps
};
//# sourceMappingURL=helper.es.es.js.map
