import { jsx as e, jsxs as u } from "react/jsx-runtime";
import { useMemo as d } from "react";
import { ContextMenuRoot as c, ContextMenuTrigger as p, ContextMenuContent as x } from "./components/ContextMenuPrimitives.js";
import b from "./components/context-menu-item/ContextMenuItem.js";
import { c as i } from "../../index-BtlgVD4m.js";
const v = ({ children: a, menuItems: r, inset: o = !0, width: t = "var(--spacing-64)" }) => {
  const m = d(() => r.map((n, s) => /* @__PURE__ */ e(b, { ...n, inset: o }, `${n.label}-${s}`)), [r, o]);
  return /* @__PURE__ */ u(c, { children: [
    /* @__PURE__ */ e(p, { asChild: !0, children: a }),
    /* @__PURE__ */ e(
      x,
      {
        className: i(
          "w-[var(--spacing-64)] rounded-md border border-[var(--base-border)] bg-[var(--base-background)] p-1 shadow-md",
          t && `w-[${t}]`
        ),
        children: m
      }
    )
  ] });
};
export {
  v as default
};
//# sourceMappingURL=ContextMenu.js.map
