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

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

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