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

/** Props for Pagination.Ellipsis. */
export interface PaginationEllipsisProps extends JSX.HTMLAttributes<HTMLSpanElement> {
  children?: JSX.Element;
}

/** Visual ellipsis indicator between non-adjacent page numbers. */
export function PaginationEllipsis(props: PaginationEllipsisProps): JSX.Element {
  const [local, rest] = splitProps(props, ["children"]);
  return (
    <span aria-hidden="true" {...rest}>
      {local.children ?? "…"}
    </span>
  );
}
