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

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

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