export function PaginationBar({
  itemCount,
  total,
}) {
  const hasKnownTotal = Number.isFinite(Number(total));
  const loadedCount = Number(itemCount || 0);
  const pageSummary = hasKnownTotal ? `已加载 ${loadedCount} 条 · 共 ${total} 条` : `已加载 ${loadedCount} 条`;

  return (
    <div className="pagination-bar">
      <div className="pagination-bar__meta">
        <span>{pageSummary}</span>
      </div>
    </div>
  );
}
