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

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

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