import type { JSX } from "solid-js";
import { splitProps } from "solid-js";

export interface ContextMenuGroupProps extends JSX.HTMLAttributes<HTMLDivElement> {
  children?: JSX.Element;
}

/** Groups related ContextMenu items together. */
export function ContextMenuGroup(props: ContextMenuGroupProps): JSX.Element {
  const [local, rest] = splitProps(props, ["children"]);
  return (
    <div role="group" {...rest}>
      {local.children}
    </div>
  );
}
