// packages/components/src/menu/group-label.tsx
import { forwardRef, useContext } from "@wordpress/element";
import { Context } from "./context.js";
import { Text } from "../text/index.js";
import * as Styled from "./styles.js";
import { jsx as _jsx } from "react/jsx-runtime";
var GroupLabel2 = forwardRef(function Group(props, ref) {
  const menuContext = useContext(Context);
  if (!menuContext?.store) {
    throw new Error("Menu.GroupLabel can only be rendered inside a Menu component");
  }
  return /* @__PURE__ */ _jsx(Styled.GroupLabel, {
    ref,
    render: (
      // @ts-expect-error The `children` prop is passed
      /* @__PURE__ */ _jsx(Text, {
        upperCase: true,
        variant: "muted",
        size: "11px",
        weight: 500,
        lineHeight: "16px"
      })
    ),
    ...props,
    store: menuContext.store
  });
});
export {
  GroupLabel2 as GroupLabel
};
//# sourceMappingURL=group-label.js.map
