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

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

/** A visual separator between ContextMenu items. */
export function ContextMenuSeparator(props: ContextMenuSeparatorProps): JSX.Element {
  const [local, rest] = splitProps(props, ["children"]);
  return (
    <div role="separator" {...rest}>
      {local.children}
    </div>
  );
}
